[New-bugs-announce] [issue25742] locale.setlocale does not work with unicode strings
tierlieb
report at bugs.python.org
Fri Nov 27 09:54:09 EST 2015
New submission from tierlieb:
Within locale.py in setlocale your have this piece of code:
if locale and type(locale) is not type(""):
# convert to string
locale = normalize(_build_localename(locale))
That does not work with unicode strings as I found out after wondering quite a bit about the difference was between my tests and my production code...
So either expand the check here to include type(u"") or make _build_localename smarter.
----------
components: Unicode
messages: 255461
nosy: ezio.melotti, haypo, tierlieb
priority: normal
severity: normal
status: open
title: locale.setlocale does not work with unicode strings
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25742>
_______________________________________
More information about the New-bugs-announce
mailing list