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

John Tamplin jat at
Wed Jan 25 09:54:13 PST 2012

On Wed, Jan 25, 2012 at 12:46 PM, Allen Wirfs-Brock
<allen at>wrote:

> Arbitrary 16-bit values can be placed in a String using either
> String.fromCharCode ( or the \uxxxx notation in string literals.
>  Neither of these enforce a requirement that individual String elements are
> valid Unicode code units.

You can't really store arbitrary 16-bit values in strings, as they will get
corrupted in some browsers.  Specifically combining marks and unpaired
surrogates are problematic, and some invalid code points get replaced with
another character.  Even if it is only text, you can't rely on the strings
not being mangled -- GWT RPC quotes different ranges of characters on
different browsers.

(the Android bug mentioned has been fixed long ago, but I haven't gone
through any kind of research to see how many of the broken browsers are
still in use to see if it is safe to remove).

John A. Tamplin
Software Engineer (GWT), Google
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list