Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 15, 2018

On FreeBSD and Solaris, os.strerror() now always decode the byte
string from the current locale encoding, rather than using
ASCII/surrogateescape in some cases.

Changes:

  • Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() which has an
    additional current_locale parameter.
  • PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and
  • PyUnicode_EncodeLocale() now always use the current locale
  • encoding, instead of using Py_DecodeLocale()/Py_EncodeLocale().
  • Document encoding in Py_DecodeLocale() and Py_EncodeLocale()
    documentations.
  • Add USE_FORCE_ASCII define to not define
    decode_ascii_surrogateescape() on Android.

https://bugs.python.org/issue32555

On FreeBSD and Solaris, os.strerror() now always decode the byte
string from the current locale encoding, rather than using
ASCII/surrogateescape in some cases.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() which has an
  additional current_locale parameter.
* PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and
* PyUnicode_EncodeLocale() now always use the current locale
* encoding, instead of using Py_DecodeLocale()/Py_EncodeLocale().
* Document encoding in Py_DecodeLocale() and Py_EncodeLocale()
  documentations.
* Add USE_FORCE_ASCII define to not define
  decode_ascii_surrogateescape() on Android
@vstinner vstinner merged commit b92c159 into python:3.6 Jan 15, 2018
@vstinner vstinner deleted the fix_locale_enc branch January 15, 2018 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants