mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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().
This commit is contained in:
parent
6ae2bbbdfc
commit
709d23dee6
11 changed files with 357 additions and 220 deletions
|
@ -488,8 +488,8 @@ static int test_init_from_config(void)
|
|||
Force it to 0 through the config. */
|
||||
config.legacy_windows_stdio = 0;
|
||||
#endif
|
||||
config.stdio_encoding = "iso8859-1";
|
||||
config.stdio_errors = "replace";
|
||||
config.stdio_encoding = L"iso8859-1";
|
||||
config.stdio_errors = L"replace";
|
||||
|
||||
putenv("PYTHONNOUSERSITE=");
|
||||
Py_NoUserSiteDirectory = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue