STINNER Victor <victor.stin...@haypocalc.com> added the comment:

The file system encoding should not be modifiable. Call 
sys.setfilesystemencoding() breaks Python, eg. module filenames are not 
reencoded. See also #8611.

sys.setfilesystemencoding() is as danregeous as sys.setdefaultencoding() 
because it changes too much things in Python.

If you would like to decode a filename with an encoding different than 
sys.setfilesystemencoding(): use the bytes type. Eg. os.listdir(b'.') gives you 
bytes filenames.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8740>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to