diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-16 13:14:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-16 13:14:10 (GMT) |
commit | 4c7c8c30235e42c47500b91549c2b6154b61f883 (patch) | |
tree | 649a94a99ea257c19a3e5ba17fc05a8044459243 /Python/compile.c | |
parent | 5a7913eb3bf390a2f3fd28116fc789bf2c7e4b64 (diff) | |
download | cpython-4c7c8c30235e42c47500b91549c2b6154b61f883.zip cpython-4c7c8c30235e42c47500b91549c2b6154b61f883.tar.gz cpython-4c7c8c30235e42c47500b91549c2b6154b61f883.tar.bz2 |
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 d29e48c..1ff0859 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; |