News for hackers. Stuff that matters.
Re:C++ Filesystem Technical Specification approved by ISO by kuschku on Saturday January 03, 2015 @11:12AM (#8831055)
Also another problem:

UCS-2, commonly used as implementation for UTF-16, doesn’t support all the characters that UTF-8 does, which can lead to other nice problems during conversion.

Re:C++ Filesystem Technical Specification approved by ISO by kevin_thibedeau on Saturday January 03, 2015 @11:47AM (#8831167)
UTF-16 covers the full Unicode space just like UTF-8. You're thinking of UCS-2 (limited to plane 0) as implemented by Windows.
Re:C++ Filesystem Technical Specification approved by ISO by kuschku on Saturday January 03, 2015 @12:12PM (#8831245)
Which can create nice issues, especially because stuff like Java is limited to UCS-2...
Re:C++ Filesystem Technical Specification approved by ISO by vardump on Saturday January 03, 2015 @01:56PM (#8831604)
> Which can create nice issues, especially because stuff like Java is limited to UCS-2...

Not true. Java uses UTF-16, not UCS-2. There are no encoding representation issues.

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.
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.

Re:C++ Filesystem Technical Specification approved by ISO by MaulingMonkey on Saturday January 03, 2015 @11:42AM (#8831150)
I suspect you're thinking of UCS-2 (UTF-16's precursor), not UTF-16 proper. Both UTF-8 and UTF-16 are variable length encodings capable of storing the entire unicode character set.
Re:C++ Filesystem Technical Specification approved by ISO by vardump on Saturday January 03, 2015 @11:34AM (#8831118)
That's not true. Both UTF-16 and UTF-8 can encode any valid unicode code point.