[issue6525] Problem with string.lowercase in Windows XP

Georg Brandl report at bugs.python.org
Wed Jul 22 13:45:10 CEST 2009


Georg Brandl <georg at python.org> added the comment:

This behavior is not a bug - when setting the locale, string.lowercase
and friends are augmented by whatever the locale considers uppercase and
lowercase letters, as byte strings.  This will lead to decoding errors
when these strings are combined with Unicode strings.

Either you use string.ascii_lowercase and friends, or you make sure you
know what encoding the strings will be in, and decode accordingly.

----------
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6525>
_______________________________________


More information about the Python-bugs-list mailing list