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

@ -495,7 +495,7 @@ Py_Main(int argc, wchar_t **argv)
/* Use utf-8 on Mac OS X */
unicode = PyUnicode_FromString(p);
#else
unicode = PyUnicode_DecodeLocale(p, 1);
unicode = PyUnicode_DecodeLocale(p, "surrogateescape");
#endif
if (unicode == NULL) {
/* ignore errors */