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 Arfrever, ezio.melotti, lemburg, loewis, vstinner
Date 2010-04-25.16:01:16
SpamBayes Score 2.1664337e-12
Marked as misclassified No
Message-id <1272211278.62.0.936715621529.issue8514@psf.upfronthosting.co.za>
In-reply-to
Content
> Please follow the naming convention used in os.path. The functions
> would have to be called os.path.fsencode() and os.path.fsdecode().

Ok

> Other than that, I'm +0 on the patch: the sys.filesystemencoding
> logic doesn't really work well in practice - on Unix and BSD
> platforms, there's no such thing as a single system-wide file
> system

Today, most POSIX system uses utf8 by default for all partitions.  If you mount an USB key, CD-Rom or network shared directory with the wrong options, you may get filenames in a different encoding. But this issue is not about fixing your OS configuration, but helping the most common case: a system using the same encoding everywhere (for the whole file system).

You are still free to use directly the native OS type (unicode on Windows, bytes on other OS), ie. don't use fsencode()/fsdecode().

Python3 prefers unicode, eg. print expects an unicode string, not a byte string. I mean it's more pratical to use unicode everywhere in Python, and so fsencode()/fsdecode() can be really useful on POSIX systems.
History
Date User Action Args
2010-04-25 16:01:18vstinnersetrecipients: + vstinner, lemburg, loewis, ezio.melotti, Arfrever
2010-04-25 16:01:18vstinnersetmessageid: <1272211278.62.0.936715621529.issue8514@psf.upfronthosting.co.za>
2010-04-25 16:01:17vstinnerlinkissue8514 messages
2010-04-25 16:01:16vstinnercreate