commit | cb428f01625f99937b59431a53cc8f6013bd3cc2 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Mon Dec 27 20:10:36 2010 +0000 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Mon Dec 27 20:10:36 2010 +0000 |
tree | e8667e28d2233034831ec06aaaf65cb3a014c7d2 | |
parent | 8e286c472b4b9c81ef2a3501ac984afe560e29a5 [diff] |
Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem encoding instead of UTF-8.
diff --git a/Python/_warnings.c b/Python/_warnings.c index 87755e1..51c39e4 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c
@@ -783,7 +783,7 @@ { PyObject *res; PyObject *message = PyUnicode_FromString(text); - PyObject *filename = PyUnicode_FromString(filename_str); + PyObject *filename = PyUnicode_DecodeFSDefault(filename_str); PyObject *module = NULL; int ret = -1;