STINNER Victor <victor.stin...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue9820> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com