mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue