diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-04 13:48:30 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-04 13:48:30 +0200 |
commit | d64e8a75e5138d5e5970f0c70995ae5cc377c421 (patch) | |
tree | 6265672e911ab4e728984d811fe63069b930d6bb /Python/bltinmodule.c | |
parent | c5ee7f213e048ae20005eb6e5a09c76f9d8ec7f0 (diff) | |
download | cpython-git-d64e8a75e5138d5e5970f0c70995ae5cc377c421.tar.gz |
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.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 4283566472..9adf530d27 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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 * |