summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-12-27 20:10:36 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-12-27 20:10:36 (GMT)
commitcb428f01625f99937b59431a53cc8f6013bd3cc2 (patch)
treee8667e28d2233034831ec06aaaf65cb3a014c7d2 /Python
parent8e286c472b4b9c81ef2a3501ac984afe560e29a5 (diff)
downloadcpython-cb428f01625f99937b59431a53cc8f6013bd3cc2.zip
cpython-cb428f01625f99937b59431a53cc8f6013bd3cc2.tar.gz
cpython-cb428f01625f99937b59431a53cc8f6013bd3cc2.tar.bz2
Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c2
1 files changed, 1 insertions, 1 deletions
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 @@ 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;