On Thursday, 30 November 2017 at 10:19:18 UTC, Walter Bright
wrote:
On 11/27/2017 7:01 PM, A Guy With an Opinion wrote:
[...]
Sooner or later your code will exhibit bugs if it assumes that
char==codepoint with UTF16, because of surrogate pairs.
https://stackoverflow.com/questions/5903008/what-is-a-surrogate-pair-in-java
As far as I can tell, pretty much the only users of UTF16 are
Windows programs. Everyone else uses UTF8 or UCS32.
I recommend using UTF8.
I assume you meant UTF32 not UCS32, given UCS2 is Microsoft's
half-assed UTF16.