This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ezio.melotti, vstinner
Date 2018-01-15.11:21:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516015284.57.0.467229070634.issue32555@psf.upfronthosting.co.za>
In-reply-to
Content
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;
 }
History
Date User Action Args
2018-01-15 11:21:24vstinnersetrecipients: + vstinner, ezio.melotti
2018-01-15 11:21:24vstinnersetmessageid: <1516015284.57.0.467229070634.issue32555@psf.upfronthosting.co.za>
2018-01-15 11:21:24vstinnerlinkissue32555 messages
2018-01-15 11:21:24vstinnercreate