]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42236: Enhance _locale._get_locale_encoding() (GH-23083)
authorVictor Stinner <vstinner@python.org>
Sun, 1 Nov 2020 19:59:35 +0000 (20:59 +0100)
committerGitHub <noreply@github.com>
Sun, 1 Nov 2020 19:59:35 +0000 (20:59 +0100)
commit82458b6cdbae3b849dc11d0d7dc2ab06ef0451c4
treef70b3003306fdc3165740eec39eadec9a2e82a9c
parent1f7dfb277e5b88cddc13e5024766be787a3e9127
bpo-42236: Enhance _locale._get_locale_encoding() (GH-23083)

* Rename _Py_GetLocaleEncoding() to _Py_GetLocaleEncodingObject()
* Add _Py_GetLocaleEncoding() which returns a wchar_t* string to
  share code between _Py_GetLocaleEncodingObject()
  and config_get_locale_encoding().
* _Py_GetLocaleEncodingObject() now decodes nl_langinfo(CODESET)
  from the current locale encoding with surrogateescape,
  rather than using UTF-8.
Include/internal/pycore_fileutils.h
Modules/_io/textio.c
Modules/_localemodule.c
Python/fileutils.c
Python/initconfig.c