MrSwiss wrote:As seen above len(String) contains 8 (UByte) while len(WString) contains 5 (UShort?),
which indicates, that *..IX* systems use UTF-8 (as standard) which is a very different
Note that it depends on distro, so it is not 100%. Be careful with embedded or old distros (like e.g. the linux on your NAS if you have access to it)
system, looking at it from a DOS/WIN perspective (ASCII/ANSI) ...
Windows 10 since 2 iterations (1803) hasn an option to make the 1-byte codepage utf8. It is still beta in fall release.
(Btw. not certain, that WString on **ix isn't evtl. 32 bits (ULong) UTF-32)
Strictly speaking afaik the wchar_t size is platform dependent, but usually 4-bytes in practice. But that is because it isn't widely used as API string type , so the wchar_t is mostly only used for certain conversions and inside font rendering routines.
Afaik QT mostly uses 16-bit strings, and so does Apple's Cocoa.
The only immutable part of all those systems is: 0 to 127, which isn't ever changed!
(as described in the lower half, of the ASCII-Table)
unicode is now 25 years old or so. (first drafts early nineties). You can be arch conservative with 25 years old junk, and still support unicode :-)