Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 1, 2020

  • 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.

https://bugs.python.org/issue42236

* 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.
@vstinner vstinner merged commit 82458b6 into python:master Nov 1, 2020
@vstinner vstinner deleted the get_locale_encoding_obj branch November 1, 2020 20:13
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants