diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/errors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index 122e444..31fa9e2 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -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 */ |