The maximum internal length applies to both byte arrays and wide character arrays throughout mIRC. If you are dealing with strings, it means characters. If you are dealing with binary variables, it means bytes. That said, this may not apply everywhere, and if you are converting back and forth between strings and binary variables, longer lengths may be preserved, but that is not guaranteed.

Regarding $len(): it has no checks on string length - it is returning the length of the string that it is seeing. The issue is with $utfencode() which was originally designed to quietly truncate results at the maximum length. This actually has been discussed before - while it would be possible to change it to report errors, the odds are that this would break scripts. The same applies to many old identifiers that truncate quietly.

In your example, $utfencode() is creating a truncated string of 8292, which is beyond the maximum allowed string length of $maxlenl. The scripting language allows you some leeway but your string is at the very maximum of the leeway. At this point, use of the string may cause a string length error at some point in the scripting language, depending on how the string is used.