mirror of
https://github.com/python/cpython.git
synced 2025-09-02 23:18:25 +00:00
Issue #13560: Locale codec functions use the classic "errors" parameter,
instead of surrogateescape So it would be possible to support more error handlers later.
This commit is contained in:
parent
ab59594326
commit
1b57967b96
6 changed files with 49 additions and 17 deletions
|
@ -1608,14 +1608,14 @@ PyAPI_FUNC(PyObject*) _PyUnicode_TransformDecimalAndSpaceToASCII(
|
|||
PyAPI_FUNC(PyObject*) PyUnicode_DecodeLocaleAndSize(
|
||||
const char *str,
|
||||
Py_ssize_t len,
|
||||
int surrogateescape);
|
||||
const char *errors);
|
||||
|
||||
/* Similar to PyUnicode_DecodeLocaleAndSize(), but compute the string
|
||||
length using strlen(). */
|
||||
|
||||
PyAPI_FUNC(PyObject*) PyUnicode_DecodeLocale(
|
||||
const char *str,
|
||||
int surrogateescape);
|
||||
const char *errors);
|
||||
|
||||
/* Encode a Unicode object to the current locale encoding. The encoder is
|
||||
strict is *surrogateescape* is equal to zero, otherwise the
|
||||
|
@ -1624,7 +1624,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_DecodeLocale(
|
|||
|
||||
PyAPI_FUNC(PyObject*) PyUnicode_EncodeLocale(
|
||||
PyObject *unicode,
|
||||
int surrogateescape
|
||||
const char *errors
|
||||
);
|
||||
|
||||
/* --- File system encoding ---------------------------------------------- */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue