Full Unicode strings strawman
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:
Will this change the behavior of character groups in regular
expressions? Would myString.match(/^.$/).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")
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss