diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-08-29 09:25:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-29 09:25:15 (GMT) |
commit | 177d921c8c03d30daa32994362023f777624b10d (patch) | |
tree | 48447c8a88ccde0129cebcdbad97560a37a22790 /Misc | |
parent | 315877dc361d554bec34b4b62c270479ad36a1be (diff) | |
download | cpython-177d921c8c03d30daa32994362023f777624b10d.zip cpython-177d921c8c03d30daa32994362023f777624b10d.tar.gz cpython-177d921c8c03d30daa32994362023f777624b10d.tar.bz2 |
bpo-34485, Windows: LC_CTYPE set to user preference (GH-8988)
On Windows, the LC_CTYPE is now set to the user preferred locale at
startup: _Py_SetLocaleFromEnv(LC_CTYPE) is now called during the
Python initialization. Previously, the LC_CTYPE locale was "C" at
startup, but changed when calling setlocale(LC_CTYPE, "") or
setlocale(LC_ALL, "").
pymain_read_conf() now also calls _Py_SetLocaleFromEnv(LC_CTYPE) to
behave as _Py_InitializeCore(). Moreover, it doesn't save/restore the
LC_ALL anymore.
On Windows, standard streams like sys.stdout now always use
surrogateescape error handler by default (ignore the locale).
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2018-08-29-11-04-19.bpo-34485.c2AFdp.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-08-29-11-04-19.bpo-34485.c2AFdp.rst b/Misc/NEWS.d/next/Core and Builtins/2018-08-29-11-04-19.bpo-34485.c2AFdp.rst new file mode 100644 index 0000000..f66a4f2 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2018-08-29-11-04-19.bpo-34485.c2AFdp.rst @@ -0,0 +1,3 @@ +On Windows, the LC_CTYPE is now set to the user preferred locale at startup. +Previously, the LC_CTYPE locale was "C" at startup, but changed when calling +setlocale(LC_CTYPE, "") or setlocale(LC_ALL, ""). |