mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -355,7 +355,7 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
|
|||
#ifndef MS_WINDOWS
|
||||
if (i != 0) {
|
||||
char *s = strerror(i);
|
||||
message = PyUnicode_DecodeLocale(s, 1);
|
||||
message = PyUnicode_DecodeLocale(s, "surrogateescape");
|
||||
}
|
||||
else {
|
||||
/* Sometimes errno didn't get set */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue