diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-16 13:14:10 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-16 13:14:10 +0000 |
commit | 24c7fa3b4d2daf8a3b9d1b3c143e6a55b5b2b4d5 (patch) | |
tree | d7b06ee69d11bc5b495472c90d6f47cec7c0e4a3 /Python/compile.c | |
parent | b1021062d8abf2d1cd37f3490a6236698ae80084 (diff) | |
download | cpython-24c7fa3b4d2daf8a3b9d1b3c143e6a55b5b2b4d5.tar.gz |
Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index d29e48c47a..1ff085909c 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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; |