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:
Victor Stinner 2011-12-17 05:47:23 +01:00
parent ab59594326
commit 1b57967b96
6 changed files with 49 additions and 17 deletions

View file

@ -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 ---------------------------------------------- */