Issue #13560: os.strerror() now uses the current locale encoding instead of UTF-8

This commit is contained in:
Victor Stinner 2011-12-17 04:45:09 +01:00
parent f2ea71fcc8
commit 1f33f2b0c3
5 changed files with 35 additions and 20 deletions

View file

@ -7891,7 +7891,7 @@ posix_strerror(PyObject *self, PyObject *args)
"strerror() argument out of range");
return NULL;
}
return PyUnicode_FromString(message);
return PyUnicode_DecodeLocale(message, 1);
}