Case transformations in strings

Brendan Eich brendan at mozilla.com
Thu Mar 5 23:34:48 PST 2009


On Mar 5, 2009, at 10:20 PM, Allen Wirfs-Brock wrote:
>
> The NOTE following toUpperCase (15.5.4.18) says:
>
> NOTE
> Because both toUpperCase and toLowerCase have context-sensitive  
> behaviour, the functions are not symmetrical. In other words,  
> s.toUpperCase().toLowerCase() is not necessarily equal to  
> s.toLowerCase().
>
> This text is a carry over from ES3 and would seem to imply that  
> context sensitive processing is expected.

IIRC this is merely about characters such as Turkish dotless-I:

js> s = "\u0131"
1
js> s.toUpperCase()
I
js> s.toUpperCase().charCodeAt(0)
73
js> s.toUpperCase().toLowerCase()
i

/be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090305/d70f3c8f/attachment.html>


More information about the Es-discuss mailing list