This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2010-08-18.11:56:02
SpamBayes Score 7.0827804e-07
Marked as misclassified No
Message-id <1282132564.59.0.094866961442.issue9632@psf.upfronthosting.co.za>
In-reply-to
Content
sys.setfilesystemencoding() function is dangerous because it introduces a lot of inconsistencies: this function is unable to reencode all filenames in all objects (eg. Python is unable to find filenames in user objects or 3rd party libraries). Eg. if you change the filesystem from utf8 to ascii, it will not be possible to use existing non-ascii (unicode) filenames: they will raise UnicodeEncodeError.

As sys.setdefaultencoding() in Python2, I think that sys.setfilesystemencoding() is the root of evil :-) PYTHONFSENCODING (issue #8622) is the right solution to set the filesysteme encoding.

Attached patch removes sys.setfilesystemencoding().
History
Date User Action Args
2010-08-18 11:56:04vstinnersetrecipients: + vstinner
2010-08-18 11:56:04vstinnersetmessageid: <1282132564.59.0.094866961442.issue9632@psf.upfronthosting.co.za>
2010-08-18 11:56:02vstinnerlinkissue9632 messages
2010-08-18 11:56:02vstinnercreate