News for hackers. Stuff that matters.
Re:JavaScript’s internal character encoding: UCS-2 or UTF-16? by __alexs on Friday January 20, 2012 @08:10AM (#3489318)
> Both UCS-2 and UTF-16 are character encodings for Unicode.

UCS-2 is not an encoding that is generally compatible with Unicode. It's kind of like saying that 7-bit ASCII and UTF-8 are character encodings for Unicode.

Re:JavaScript’s internal character encoding: UCS-2 or UTF-16? by TheoLib on Friday January 20, 2012 @12:19PM (#3490224)
Why is UTF-8 not an encoding for Unicode?

From the Unicode website (http://www.unicode.org/faq/utf_bom.html#UTF8): "UTF-8 is the byte-oriented encoding form of Unicode."

From Wikipedia (http://en.wikipedia.org/wiki/UTF-8): "UTF-8 (UCS Transformation Format — 8-bit[1]) is a variable-width encoding that can represent every character in the Unicode character set."

Re:JavaScript’s internal character encoding: UCS-2 or UTF-16? by mathias on Friday January 20, 2012 @08:14AM (#3489325)
> It's kind of like saying that 7-bit ASCII and UTF-8 are character encodings for Unicode.

They can only encode a subset of Unicode, sure, but they’re still character encodings for Unicode, right?

Re:JavaScript’s internal character encoding: UCS-2 or UTF-16? by __alexs on Friday January 20, 2012 @08:26AM (#3489352)
Sure, but if I buy a product released in 2012 that advertises "Unicode" support, and it turns out that it only supports a version of it from the era of IE4, I'm probably going to whine.