mirror of
https://github.com/python/cpython.git
synced 2025-07-16 15:55:18 +00:00
Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
This commit is contained in:
parent
8e286c472b
commit
cb428f0162
4 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue