First Impressions!

Walter Bright newshound2 at digitalmars.com
Thu Nov 30 21:50:13 UTC 2017


On 11/30/2017 5:22 AM, A Guy With a Question wrote:
> It's also worth mentioning that the more I think about it, the UTF8 vs. UTF16 
> thing was probably not worth mentioning with the rest of the things I listed 
> out. It's pretty minor and more of a preference.

Both Windows and Java selected UTF16 before surrogates were added, so it was a 
reasonable decision made in good faith. But an awful lot of Windows/Java code 
has latent bugs in it because of not dealing with surrogates.

D is designed from the ground up to work smoothly with UTF8/UTF16 multi-codeunit 
encodings. If you do decide to use UTF16, please take advantage of this and deal 
with surrogates correctly. When you do decide to give up on UTF16 (!) and go 
with UTF8, your code will be easy to convert to UTF8.


More information about the Digitalmars-d mailing list