Re: Question about the “full Unicode in strings” strawman

John Tamplin jat at google.com
Wed Jan 25 12:25:34 PST 2012


On Wed, Jan 25, 2012 at 2:55 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

> The primary intent of the proposal was to extend ES Strings to support a
> uniform represent of all Unicode characters, including non-BMP.  That means
> that any Unicode character should occupy exactly one element position
> within a String value.  Interpreting \u{10ffff} as an UTF-16 encoding does
> not satisfy that objective.  In particular, under that approach
> "\{10ffff}".length would be 2 while a uniform character representation
> should yield a length of 1.
>
> When this proposal was originally floated, the much of debated seemed to
> be about whether such a uniform character representation was desirable or
> even useful.  See the thread starting at
> https://mail.mozilla.org/pipermail/es-discuss/2011-May/014252.html also
> https://mail.mozilla.org/pipermail/es-discuss/2011-May/014316.html and
>

That seems highly likely to break existing code that assumes UTF16
representation of JS strings.

-- 
John A. Tamplin
Software Engineer (GWT), Google
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120125/763318d5/attachment.html>


More information about the es-discuss mailing list