3 ms·
A lot of the contexts where C++ has been deployed predate the shift to UTF-8 so I think there's actually more of a reason to have the support.
by vvanders 4y ago
A lot of the contexts where C++ has been deployed predate the shift to UTF-8 so I think there's actually more of a reason to have the support.
- nine_k 4y agoSay, for Japanese texts Shift-JIS is vastly more economical than UTF-8, so a number of systems uses it. Likely this is the case for some other writing systems. UTF-16 should work in there cases eventually though.
- astrange 4y agoMany of those texts include enough ASCII characters (like HTML tags) that UTF-8 is more efficient even then.
- tialaramex 4y agoFor ASCII (except the blackslash and tilde) Shift-JIS and UTF-8 are the same, one byte. So your HTML tags work just fine in Shift-JIS. For small Japanese-only text, Shift-JIS really will be smaller, but it's just not usually enough to care, and the price is you can't do Unicode. It occupies a similar space to 8859-1 / Windows 1252 where older software uses it but you should just transition.
- astrange 4y agoOh, I meant UTF-8 would be more efficient than UTF-16.