summaryrefslogtreecommitdiffstats
path: root/Python/preconfig.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-02 18:56:30 (GMT)
committerGitHub <noreply@github.com>2019-05-02 18:56:30 (GMT)
commit709d23dee69e700b87d5a4cb59e149d0e1af7993 (patch)
treeb06aafe79f83137a3c85649bcebf1fbfd2ea1240 /Python/preconfig.c
parent6ae2bbbdfcb8969d1d362b17c2fbd5a684fa4f9d (diff)
downloadcpython-709d23dee69e700b87d5a4cb59e149d0e1af7993.zip
cpython-709d23dee69e700b87d5a4cb59e149d0e1af7993.tar.gz
cpython-709d23dee69e700b87d5a4cb59e149d0e1af7993.tar.bz2
bpo-36775: _PyCoreConfig only uses wchar_t* (GH-13062)
_PyCoreConfig: Change filesystem_encoding, filesystem_errors, stdio_encoding and stdio_errors fields type from char* to wchar_t*. Changes: * PyInterpreterState: replace fscodec_initialized (int) with fs_codec structure. * Add get_error_handler_wide() and unicode_encode_utf8() helper functions. * Add error_handler parameter to unicode_encode_locale() and unicode_decode_locale(). * Remove _PyCoreConfig_SetString(). * Rename _PyCoreConfig_SetWideString() to _PyCoreConfig_SetString(). * Rename _PyCoreConfig_SetWideStringFromString() to _PyCoreConfig_DecodeLocale().
Diffstat (limited to 'Python/preconfig.c')
-rw-r--r--Python/preconfig.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/preconfig.c b/Python/preconfig.c
index 108cbc6..48b9e83 100644
--- a/Python/preconfig.c
+++ b/Python/preconfig.c
@@ -14,7 +14,10 @@
/* --- File system encoding/errors -------------------------------- */
/* The filesystem encoding is chosen by config_init_fs_encoding(),
- see also initfsencoding(). */
+ see also initfsencoding().
+
+ Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
+ are encoded to UTF-8. */
const char *Py_FileSystemDefaultEncoding = NULL;
int Py_HasFileSystemDefaultEncoding = 0;
const char *Py_FileSystemDefaultEncodeErrors = NULL;