mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #9642: Fix filesystem encoding initialization: use the ANSI code page on
Windows if the mbcs codec is not available, and fail with a fatal error if we cannot get the locale encoding (if nl_langinfo(CODESET) is not available) instead of using UTF-8.
This commit is contained in:
parent
c5ee7f213e
commit
d64e8a75e5
3 changed files with 20 additions and 18 deletions
|
@ -24,12 +24,9 @@ int Py_HasFileSystemDefaultEncoding = 1;
|
|||
#elif defined(__APPLE__)
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
int Py_HasFileSystemDefaultEncoding = 1;
|
||||
#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
|
||||
#else
|
||||
const char *Py_FileSystemDefaultEncoding = NULL; /* set by initfsencoding() */
|
||||
int Py_HasFileSystemDefaultEncoding = 0;
|
||||
#else
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
int Py_HasFileSystemDefaultEncoding = 1;
|
||||
#endif
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue