[issue13717] print fails on unicode '\udce5' surrogates not allowed

Ezio Melotti report at bugs.python.org
Thu Jan 5 21:23:12 CET 2012


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

On Python 3, os.walk() uses the surrogateescape error handler.  If the filename is in e.g. iso-8859-* and the filesystem encoding is UTF-8, decoding '\xe5' will then result in '\udce5', and '\udce5' can't then be printed because it's a lone surrogate.

See also http://docs.python.org/dev/library/os.html#file-names-command-line-arguments-and-environment-variables

----------
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13717>
_______________________________________


More information about the Python-bugs-list mailing list