Marc-Andre Lemburg <m...@egenix.com> added the comment: STINNER Victor wrote: > > STINNER Victor <victor.stin...@haypocalc.com> added the comment: > >> upon program startup, init LibC environment: setlocale(LC_ALL, ""); > > Python 3 does something like that: Py_InitializeEx() calls > setlocale(LC_CTYPE, ""). But I (and others) consider that as a bug (see #6203 > discussion): Python should not do that (nor any library) implicitly, but a > *program* can do that (once) at startup (explicitly).
Agreed. See the discussion on the ticket for more details. setlocale() should only be called by applications, not by libraries. For Python this means: calling it in main() is fine, but not in Py_InitializeEx(). ---------- nosy: +lemburg title: locale.setlocale() doesn't change I/O codec, os.environ -> locale.setlocale() doesn't change I/O codec, os.environ _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11022> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com