Wide characters support in D
Nick Sabalausky
a at a.a
Mon Jun 7 23:14:20 PDT 2010
"Ruslan Nikolaev" <nruslan_devel at yahoo.com> wrote in message
news:mailman.127.1275974825.24349.digitalmars-d at puremagic.com...
>
> True. But even simple string handling is faster for UTF-16. The time
> required to read 2 bytes from UTF-16 string is the same 1 byte from UTF-8.
> Generally, we have to read one code point after another (not more than
> this) since data guaranteed to be aligned by 2 byte boundary for wchar and
> 1 byte for char. Not to mention that converting 2 code points takes less
> time in UTF-16. And why not use this opportunity if system already
> natively support this?
>
Why do you say that UTF-16 is faster than UTF-8?
>In general, it is a good practice since 1 byte char text is not necessary
>UTF-8 anyway and can be ANSI as well.
>
That's what the BOM is for.
More information about the Digitalmars-d
mailing list