Case transformations in strings

David-Sarah Hopwood david.hopwood at
Tue Mar 24 12:10:18 PDT 2009

Christian Plesner Hansen wrote:
> David-Sarah Hopwood wrote:
>> If converting one character to many would cause a problem with the
>> reference to toUpperCase in the regular expression algorithm, then
>> presumably Safari and Chrome would hit that problem. Do they, or
>> do they use different uppercase conversions for regexps vs
>> toUpperCase?
> Chrome uses context (but not locale) sensitive special casing for
> ordinary toUpperCase.  For regexps it uses the same mapping but
> doesn't convert chars that map to more than one char and non-ascii
> chars that would have converted to ascii chars.  We would have liked
> to use the full multi-character mapping without the exception for
> ascii but couldn't for compatibility reasons.

Can you expand on what the compatibility problem was for
non-ASCII -> ASCII mappings in regexps?

David-Sarah Hopwood ⚥

More information about the Es-discuss mailing list