]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) (GH-8974)
authorVictor Stinner <vstinner@redhat.com>
Tue, 28 Aug 2018 11:51:20 +0000 (13:51 +0200)
committerGitHub <noreply@github.com>
Tue, 28 Aug 2018 11:51:20 +0000 (13:51 +0200)
commit65ef7425a32ee411d8047a4fad0fc6bb9ff733b1
tree30c111f0aec78b0c2239df00346aa1a48580d652
parente3f20828f6b7f59baa2d25437176ee32ae7700b0
bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) (GH-8974)

* The UTF-8 Mode is now also enabled by the "POSIX" locale, not only
  by the "C" locale.
* On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also forces
  the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if
  the LC_CTYPE locale is "C".
* test_utf8_mode.test_cmd_line() checks also that the command line
  arguments are decoded from UTF-8 when the the UTF-8 Mode is enabled
  with POSIX locale or C locale.

(cherry picked from commit 5cb258950ce9b69b1f65646431c464c0c17b1510)
Lib/test/test_utf8_mode.py
Misc/NEWS.d/next/Core and Builtins/2018-08-28-11-52-13.bpo-34527.sh5MQJ.rst [new file with mode: 0644]
Misc/NEWS.d/next/Core and Builtins/2018-08-28-11-53-39.bpo-34527.aBEX9b.rst [new file with mode: 0644]
Modules/main.c
Python/fileutils.c