diff options
| author | Steve Dower <steve.dower@microsoft.com> | 2016-09-08 10:35:16 -0700 | 
|---|---|---|
| committer | Steve Dower <steve.dower@microsoft.com> | 2016-09-08 10:35:16 -0700 | 
| commit | cc16be85c0b7119854c00fb5c666825deef641cf (patch) | |
| tree | 18b9a8020679f8a0e6e0dd1ecb5668024be499b7 /Python/bltinmodule.c | |
| parent | cfbd48bc56980823dd8e2560e0ce4e46e33e4e3d (diff) | |
| download | cpython-git-cc16be85c0b7119854c00fb5c666825deef641cf.tar.gz | |
Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)
Diffstat (limited to 'Python/bltinmodule.c')
| -rw-r--r-- | Python/bltinmodule.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index be145609dd..252c0a7b89 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -21,16 +21,18 @@     Don't forget to modify PyUnicode_DecodeFSDefault() if you touch any of the     values for Py_FileSystemDefaultEncoding!  */ -#ifdef HAVE_MBCS -const char *Py_FileSystemDefaultEncoding = "mbcs"; +#if defined(__APPLE__) +const char *Py_FileSystemDefaultEncoding = "utf-8";  int Py_HasFileSystemDefaultEncoding = 1; -#elif defined(__APPLE__) +#elif defined(MS_WINDOWS) +/* may be changed by initfsencoding(), but should never be free()d */  const char *Py_FileSystemDefaultEncoding = "utf-8";  int Py_HasFileSystemDefaultEncoding = 1;  #else  const char *Py_FileSystemDefaultEncoding = NULL; /* set by initfsencoding() */  int Py_HasFileSystemDefaultEncoding = 0;  #endif +const char *Py_FileSystemDefaultEncodeErrors = "surrogateescape";  _Py_IDENTIFIER(__builtins__);  _Py_IDENTIFIER(__dict__); | 
