Re: String.fromCodePoint and surrogate pairs?

2013-01-14 Thread Norbert Lindenberg
Steele Cc: Norbert Lindenberg; Erik Arvidsson; es-discuss@mozilla.org Subject: Re: String.fromCodePoint and surrogate pairs? The Unicode standard defines code point as any value in the range of integers from 0 to 0x10 - see definitions D9 and D10 of chapter 3 [1]. Once you exclude

RE: String.fromCodePoint and surrogate pairs?

2013-01-14 Thread Shawn Steele
Lindenberg; Erik Arvidsson; es-discuss@mozilla.org Subject: Re: String.fromCodePoint and surrogate pairs? I don't have a good scenario at hand either that would require support for surrogate code points, but in ECMAScript the question is often asked the other way around: Why reject it? And given

String.fromCodePoint and surrogate pairs?

2012-12-12 Thread Erik Arvidsson
It was suggested to me that we could probably extend String.fromCodePoint to be aware of UTF-16 code units too. It seems doable since the lead surrogate is not a valid code point. The question is if it is worth it? It seems like we are going down a slippery slope if we start to do things like

Re: String.fromCodePoint and surrogate pairs?

2012-12-12 Thread Norbert Lindenberg
Do you know what the people who talked to you mean by aware of UTF-16 code units? As specified, String.fromCodePoint, accepts all UTF-16 code units because they use a subset of the integers allowed as code points (0 to 0x versus 0 to 0x10). For non-surrogate values, you get exactly

RE: String.fromCodePoint and surrogate pairs?

2012-12-12 Thread Shawn Steele
Arvidsson Cc: es-discuss@mozilla.org Subject: Re: String.fromCodePoint and surrogate pairs? Do you know what the people who talked to you mean by aware of UTF-16 code units? As specified, String.fromCodePoint, accepts all UTF-16 code units because they use a subset of the integers allowed as code

Re: String.fromCodePoint and surrogate pairs?

2012-12-12 Thread Norbert Lindenberg
[mailto:es-discuss-boun...@mozilla.org] On Behalf Of Norbert Lindenberg Sent: Wednesday, December 12, 2012 1:25 PM To: Erik Arvidsson Cc: es-discuss@mozilla.org Subject: Re: String.fromCodePoint and surrogate pairs? Do you know what the people who talked to you mean by aware of UTF-16 code

RE: String.fromCodePoint and surrogate pairs?

2012-12-12 Thread Shawn Steele
...@norbertlindenberg.com] Sent: Wednesday, December 12, 2012 2:40 PM To: Shawn Steele Cc: Norbert Lindenberg; Erik Arvidsson; es-discuss@mozilla.org Subject: Re: String.fromCodePoint and surrogate pairs? The Unicode standard defines code point as any value in the range of integers from 0