Re:JavaScript’s internal character encoding: UCS-2 or UTF-16?
by patorjk on Friday January 20, 2012 @08:17AM
(#3489334)
Very nice write up. I was actually looking for something like this about a week ago, and was referred to the ECMAScript spec (section 8.4) which talked about "UTF-16 code units" - which I believe is just UCS-2. If this is the case, I kind of wonder if the spec should be updated to make things a little more clear, since the issue isn't straight forward for those who don't know a lot about unicode.
[ Parent
| on HN ]
Re:JavaScript’s internal character encoding: UCS-2 or UTF-16?
by finnw on Friday January 20, 2012 @12:29PM
(#3490261)
Not quite. Surrogates (http://stackoverflow.com/q/5178202/12048) are UTF-16 code units but they are not UCS-2 code units.