[Python-Dev] Add a new "locale" codec?

Simon Cross hodgestar+pythondev at gmail.com
Wed Feb 8 14:30:15 CET 2012


On Wed, Feb 8, 2012 at 3:25 PM, Victor Stinner
<victor.stinner at haypocalc.com> wrote:
> Sorry, I don't understand what do you mean by "weird things". The
> "locale" codec doesn't touch the locale.

Sorry for being unclear. My question was about the following lines
from http://docs.python.org/library/locale.html#locale.getpreferredencoding:

"""On some systems, it is necessary to invoke setlocale() to obtain
the user preferences, so this function is not thread-safe. If invoking
setlocale is not necessary or desired, do_setlocale should be set to
False."""

So my question was about what happens on such systems where invoking
setlocale is necessary to obtain the user preferences?

Schiavo
Simon


More information about the Python-Dev mailing list