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