Full Unicode strings strawman

Mike Samuel mikesamuel at gmail.com
Mon May 16 11:30:03 PDT 2011


2011/5/16 Allen Wirfs-Brock <allen at wirfs-brock.com>:
> I tried to post a pointer to this strawman on this list a few weeks ago, but
> apparently it didn't reach the list for some reason.
> Feed back would be appreciated:
> http://wiki.ecmascript.org/doku.php?id=strawman:support_full_unicode_in_strings

Will this change the behavior of character groups in regular
expressions?  Would myString.match(/^.$/)[0].length ever have length
2?   Would it ever match a supplemental codepoint?

How would the below, which replaces orphaned surrogates with U+FFFD
when strings are viewed as sequences of UTF-16 code units behave?

myString.replace( /[\ud800-\udbff](?![\udc00-\uffff])/g, "\ufffd")
    .replace( /(^|[^\ud800-\udbff])([\udc00-\udffff])/g, "\ufffd")


> Allen
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


More information about the es-discuss mailing list