Re: New full Unicode for ES6 idea

On Mon, 20 Feb 2012 18:15:31 +0100, Allen Wirfs-Brock  
<allen@wirfs-brock.com> wrote:
> On Feb 20, 2012, at 4:19 AM, Wes Garland wrote:
>> I think so, too -- especially as any sequence of Unicode code points --  
>> including invalid and reserved code points -- constitutes a valid  
>> Unicode string, according to my recollection of the Unicode  
>> specification.
>
> For the moment, I'll simply take Wes' word for the above, as it  
> logically makes sense.  For some uses, you want to process all possible  
> code points (for example, when validating data from an external  
> source).  At this lowest level you don't want to impose higher level  
> Unicode semantic constraints:
>
>        if (stringFromElseWhere.indexOf("\u{d800}")) ....

It's wrong though. UTF-8 cannot express surrogate code points for instance.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Monday, 20 February 2012 17:20:50 UTC