[issue32555] Encoding issues with the locale encoding
STINNER Victor
report at bugs.python.org
Mon Jan 15 06:21:24 EST 2018
STINNER Victor <victor.stinner at gmail.com> added the comment:
I'm not sure that locale.bindtextdomain() uses the right encoding neither. I propose the following fix:
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index 324b694b83..1de17d3620 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -555,7 +555,7 @@ PyIntl_bindtextdomain(PyObject* self,PyObject*args)
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
- result = PyUnicode_DecodeLocale(current_dirname, NULL);
+ result = PyUnicode_DecodeFSDefault(current_dirname);
Py_XDECREF(dirname_bytes);
return result;
}
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32555>
_______________________________________
More information about the Python-bugs-list
mailing list