diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-12-27 20:10:36 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-12-27 20:10:36 +0000 |
commit | 5c84d094727910799a607dddf3cf8f7008a6a65e (patch) | |
tree | 4ba361e6eaf3ef92dc14b719152af45a8e3fe86e /Python/_warnings.c | |
parent | 9b86d1d19849f89c69aa76cf8b550a65901b2a1e (diff) | |
download | cpython-5c84d094727910799a607dddf3cf8f7008a6a65e.tar.gz |
Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 87755e1edb..51c39e48d4 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -783,7 +783,7 @@ PyErr_WarnExplicit(PyObject *category, const char *text, { 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; |