[IronPython] Issue about string.upper and string.lower

Glenn Jones glenn.k.jones+ipy at gmail.com
Fri Dec 12 16:27:27 CET 2008

Hello everybody,

We ran across
collation issues) today while trying to port Resolver One to
IronPython 2.0.

This is in a test that tries to import decimal while in the turkish locale
(it was actually reported by a user!). It does an .upper on a string with an
'i', and that doesn't give the expected results.

This is a very big issue because all the python code out there expects
string transformations to be locale-independent, and there may be strange
bugs in strange places.

Is mapping .upper and .lower to ToUpperInvariant and ToLowerInvariant an
acceptable solution? People that want to do locale-dependent transformations
can always use the .NET specific ToUpper/ToLower.

We can work around the decimal being unimportable by hacking it, but clearly
this is not a general solution. We will report other modules that might fail
from this as we find them.

Glenn and Orestis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081212/6c7fd4df/attachment.html>

More information about the Ironpython-users mailing list