[Python-Dev] logging module broken because of locale

Mihai Ibanescu misa at redhat.com
Tue Jul 18 19:45:41 CEST 2006


On Tue, Jul 18, 2006 at 10:19:54AM -0700, Guido van Rossum wrote:
> Alternatively, does "info".upper() == "INFO" everywhere?

Not in the Turkish locale :-(

# begin /tmp/foo.py
import locale

locale.setlocale(locale.LC_ALL, '')

print "info".upper()
print "info".upper() == "INFO"
# end /tmp/foo.py

LANG=tr_TR.UTF-8 python /tmp/foo.py
iNFO
False

Thanks,
Misa


More information about the Python-Dev mailing list