I just noticed something odd. Within mksh proper:
$ echo $LANG nl_NL.UTF-8 $ V=bhta $ echo ${#V} 4 everything is fine; the UTF-8 string is correctly measured to be 4 characters. But when you do: $ mksh -c 'echo $LANG; V=bhta; echo ${#V}' nl_NL.UTF-8 5 five characters (bytes) are measured, even though the locale is still UTF-8. So it looks like multibyte character support is not activated when commands are executed with -c. I've also tested other shells (bash, dash, yash, AT&T ksh, zsh) and on them it makes no difference whether -c is used or not. So it looks like a bug in mksh. Thanks, - M.