mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Issue #13560: os.strerror() now uses the current locale encoding instead of UTF-8
This commit is contained in:
parent
f2ea71fcc8
commit
1f33f2b0c3
5 changed files with 35 additions and 20 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue