Full Unicode strings strawman
Allen Wirfs-Brock
allen at wirfs-brock.com
Mon May 16 17:18:21 PDT 2011
On May 16, 2011, at 5:06 PM, Brendan Eich wrote:
> On May 16, 2011, at 2:07 PM, Boris Zbarsky wrote:
>
>> That said, defining JS strings and DOMString differently seems like a recipe for serious author confusion (e.g. actually using JS strings as the DOMString binding in ES might be lossy, assigning from JS strings to DOMString might be lossy, etc). It's a minefield.
>
> Plus, people stuff random data into JS strings, which so far have not UTF-16 validated or indexed, and they could read back arbitrary uint16s in a row.
>
> Breaking this seems web-breaking to me, from what I remember. It's impossible to detect statically (early error).
I think I've addressed this in other responses, including in https://mail.mozilla.org/pipermail/es-discuss/2011-May/014307.html
See the part about passing a string with >16-bit chars to a parameter that requires a DOMString
The main thing to add, is that to put random >16-bit values into a string requires using new APIs or syntax defined in the proposal and that currently is not in ES or browsers. I don't see how that can be called "web-breaking"
Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110516/aa96ced3/attachment.html>
More information about the es-discuss
mailing list