mksh semantics for evaluating
substring expansion ${strvar:pos:len} and string length
${#strvar} expressions has changed today. These operations
now work on characters, not on bytes. Characters are octets in
non-UTFMODE (which is pretty much the same as bytes, because mksh(1)
is a BSD application and, as per style(9), allowed to assume certain
things about the environment) and MirOS OPTU-8 multibyte character
sequences in utf8-mode.

This means things like typeset -Uui16 -Z7 wc=1#${str::1}
now do the right thing (getting you the MirOS OPTU-16 wide character
value of the first character in the str).