New full Unicode for ES6 idea

Wes Garland wes at page.ca
Mon Feb 20 07:06:00 PST 2012


On 20 February 2012 09:56, Andrew Oakley <andrew at ado.is-a-geek.net> wrote:

>
> While this is being discussed, for any new string handling I think we
> should make any invalid strings (according to the rules in Unicode)
> cause some kind of exception on creation.
>

Can you clarify which definition in the Unicode standard you are proposing
for "invalid string"?

> Most content actually only tries to access characters of a string like
this:
>
> for (var i = 0; i < str.length(); i++) {
>       str[i];
> }

Does anybody have any data on this?  I'm genuinely curious about how much
code "on the web" does any kind of character access on strings; the only
common use-case that comes to mind (other than wanting uint16[]) is users
who are doing UTF-16 on top of UCS-2.

Wes

-- 
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120220/b59af458/attachment.html>


More information about the es-discuss mailing list