MirOS News

Sponsored by
HostEurope Logo

MirOS News

All 1 2 3 4 5 6 7 8 9 10 11 12

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).

mksh R38 will thusly be released RSN.

MirOS Logo