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 loewis
Date 2003-03-04.14:40:38
SpamBayes Score
Marked as misclassified
Logged In: YES 

Guido's scenario was precisely the reason why Unix was left
out from consideration for PEP 277.

However, it is better than it sounds: There is a good chance
that invoking locale.setlocale(locale.LC_CTYPE, "") prior to
invoking listdir will overcome the problem, as the setlocale
call will set the file system encoding to the user's
preference. If \xff is a valid file name in the user's
preferred encoding, then listdir will succeed in converting
this file name to a Unicode string.

It might be useful to set the file system encoding on Unix
to the user's preferred encoding unconditionally (i.e. not
as a side effect of invoking setlocale). It might also be
useful to expose the file system encoding read-only for
Date User Action Args
2007-08-23 15:20:30adminlinkissue683592 messages
2007-08-23 15:20:30admincreate