Re:C++ Filesystem Technical Specification approved by ISO
by heinrich5991 on Saturday January 03, 2015 @05:03PM
(#8832180)
I believe strings in Java are not checked for UTF-16, but are just arrays of 16-bit integers and as such used as UCS-2 by most Java code.
[ Parent
| on HN ]
Re:C++ Filesystem Technical Specification approved by ISO
by jerven on Sunday January 04, 2015 @08:15AM
(#8834313)
Most code written in the US/UK does not care about multiple codepoint used to represent one glyph. But that does not change the fact that the String representation inside Java are actually encoded in UFT-16 since Java1.5 (i.e. since 2004).
Actually dealing with multi codepoint characters is hard in any programming language and most people ignore it as often GUI stuff already takes care of it.
By the way any string encoded in UTF-16 is an array of 16bit unsigned integers. It just has variable length encoding which UCS-2 did not have. Just like UTF-8 is an array of bytes just like 8bit ASCII.