summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-06-03 20:07:27 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-06-03 20:07:27 (GMT)
commita534fc4b3bd4b731be9304be626bc161f53d7bfb (patch)
tree503ac32ab7c4de6f54c73597d04f97b82930397e /Modules/posixmodule.c
parentcaa00fec19705c656497658c6ff1b1fff62a4484 (diff)
downloadcpython-a534fc4b3bd4b731be9304be626bc161f53d7bfb.zip
cpython-a534fc4b3bd4b731be9304be626bc161f53d7bfb.tar.gz
cpython-a534fc4b3bd4b731be9304be626bc161f53d7bfb.tar.bz2
Close #18109: os.uname() now decodes fields from the locale encoding, and
socket.gethostname() now decodes the hostname from the locale encoding, instead of using the UTF-8 encoding in strict mode.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 7c96a67..3b4b570 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4514,7 +4514,7 @@ posix_uname(PyObject *self, PyObject *noargs)
#define SET(i, field) \
{ \
- PyObject *o = PyUnicode_DecodeASCII(field, strlen(field), NULL); \
+ PyObject *o = PyUnicode_DecodeFSDefault(field); \
if (!o) { \
Py_DECREF(value); \
return NULL; \