mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Issue #16455: On FreeBSD and Solaris, if the locale is C, the
ASCII/surrogateescape codec is now used, instead of the locale encoding, to decode the command line arguments. This change fixes inconsistencies with os.fsencode() and os.fsdecode() because these operating systems announces an ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
This commit is contained in:
parent
ca9f8b21c8
commit
d45c7f8d74
5 changed files with 242 additions and 41 deletions
|
@ -1742,7 +1742,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_DecodeLocale(
|
|||
/* Encode a Unicode object to the current locale encoding. The encoder is
|
||||
strict is *surrogateescape* is equal to zero, otherwise the
|
||||
"surrogateescape" error handler is used. Return a bytes object. The string
|
||||
cannot contain embedded null characters.. */
|
||||
cannot contain embedded null characters. */
|
||||
|
||||
PyAPI_FUNC(PyObject*) PyUnicode_EncodeLocale(
|
||||
PyObject *unicode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue