[issue8740] infinite recursion with setfilesystemencoding and pdb

STINNER Victor report at bugs.python.org
Mon May 17 17:18:35 CEST 2010


STINNER Victor <victor.stinner at 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 <report at bugs.python.org>
<http://bugs.python.org/issue8740>
_______________________________________


More information about the Python-bugs-list mailing list