[issue10114] compile() doesn't support the PEP 383 (surrogates)
STINNER Victor
report at bugs.python.org
Sat Oct 16 00:04:56 CEST 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
#6543 changed code->co_filename encoding from filesystem encoding+surrogateescape to utf-8+strict.
With my patch, compile('', '\udcc3\udca9', 'exec').co_filename gives 'é', it doesn't depend on the filesystem encoding. But 'é' cannot be used with all filesystem encodings, eg. with ascii locale encoding (C locale), use it raises an error.
I now think that it was a bad idea to use utf-8 instead of the fileystem encoding. All filenames should use the filesystem encoding in Python.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10114>
_______________________________________
More information about the Python-bugs-list
mailing list