mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode.
This commit is contained in:
parent
5a7913eb3b
commit
4c7c8c3023
7 changed files with 69 additions and 28 deletions
|
@ -3942,7 +3942,7 @@ makecode(struct compiler *c, struct assembler *a)
|
|||
freevars = dict_keys_inorder(c->u->u_freevars, PyTuple_Size(cellvars));
|
||||
if (!freevars)
|
||||
goto error;
|
||||
filename = PyUnicode_FromString(c->c_filename);
|
||||
filename = PyUnicode_DecodeFSDefault(c->c_filename);
|
||||
if (!filename)
|
||||
goto error;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue