[issue20793] locale.setlocale()

Ned Deily report at bugs.python.org
Thu Feb 27 21:27:36 CET 2014


Ned Deily added the comment:

Thanks for the report.  There was a lengthy discussion of this behavior a few years ago in Issue3067.  At that time it was decided not to change this behavior for 2.7.  I'm not sure if the __future__ "unicode_literals" was considered then, however you can work around it by using the b"" literal syntax:

    locale.setlocale(locale.LC_ALL, b'POSIX')

----------
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> setlocale error message is confusing

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


More information about the Python-bugs-list mailing list