[OT] UTF-16
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 31 16:34:09 PDT 2016
Am Tue, 31 May 2016 15:47:02 -0700
schrieb Walter Bright <newshound2 at digitalmars.com>:
> But I didn't know which encoding would win - UTF-8, UTF-16, or UCS-2, so D bet
> on all three. If I had a do-over, I'd just support UTF-8. UTF-16 is useful
> pretty much only as a transitional encoding to talk with Windows APIs.
I think so too, although more APIs than just Windows use
UTF-16. Think of Java or ICU. Aside from their Java heritage
they found that it is the fastest encoding for transcoding
from and to Unicode as UTF-16 codepoints cover most 8-bit
codepages. Also Qt defined a char as UTF-16 code point, but
they probably regret it as the 'charmap' program KCharSelect
is now unable to show Unicode characters >= 0x10000.
--
Marco
More information about the Digitalmars-d
mailing list