STINNER Victor added the comment: It looks like a real issue, but on which platform did you get the error?
> setlocale fails due to locale.h being wrapped up in LANGINFO check. What do you mean by "fail"? Is it an error at runtime? Or during the compilation? -- The include was added recently: changeset: 81257:c256764e2b3f branch: 3.2 parent: 81253:c4a4863b85b2 user: Victor Stinner <victor.stin...@gmail.com> date: Thu Jan 03 01:08:58 2013 +0100 files: Misc/NEWS Objects/unicodeobject.c Python/fileutils.c description: Issue #16455: On FreeBSD and Solaris, if the locale is C, the ASCII/surrogateescape codec is now used, instead of the locale encoding, to decode the command line arguments. This change fixes inconsistencies with os.fsencode() and os.fsdecode() because these operating systems announces an ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice. The commit was integrated in Python 3.2.5 and Python 3.3.2 . If I remember correctly, I copied/pasted the code from Python/pythonrun.c: #ifdef HAVE_LANGINFO_H #include <locale.h> #include <langinfo.h> #endif Many other files use "#include <locale.h>" without #ifdef HAVE_LANGINFO_H: Modules/main.c, Modules/python.c, Modules/readline.c, Python/frozenmain.c, Python/pystrtod.c and Modules/_localemodule.c. The #include in Modules/main.c was added 5 years ago by changeset 22a74eaf6b22. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19036> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com