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

Simon Cross hodgestar+pythondev at gmail.com
Wed Feb 8 10:28:55 CET 2012


I think I'm -1 on a "locale" encoding because it refers to different
actual encodings depending on where and when it's run, which seems
surprising, and there's already a more explicit way to achieve the
same effect.

The documentation on .getpreferredencoding() says some scary things
about needing to call .setlocale() sometimes but doesn't really say
when or why. Could any of those cases make "locale" do weird things
because it doesn't call setlocale()?


More information about the Python-Dev mailing list