[issue9820] Windows : os.listdir(b'.') doesn't raise an error for unencodable filenames
STINNER Victor
report at bugs.python.org
Fri Sep 10 13:06:26 CEST 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
> os.listdir(b'listdir') should raise an error (and not ignore
> the filename or replaces unencodable characters by b'?').
To avoid the error, a solution is to support the PEP 383 on Windows (for the mbcs encoding). I opened a separated issue for that: #9821.
But support PEP 383 will not fix this issue because the current implementation of listdir(b'.') doesn't use the Python codec, but use raw bytes filenames (use the ANSI API).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9820>
_______________________________________
More information about the Python-bugs-list
mailing list