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 lemburg
Recipients
Date 2003-02-10.17:46:49
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=38388

Ok, let's look at it from a different
angle: things that you get from os.listdir() should be
compatible 
to (at least) all the os.path tools and os itself.
Converting to 
Unicode has the advantage that slicing and indexing into the
path names will not break the paths (unlike UTF-8 encoded 8-bit
strings which tend to break when you slice them).

That said, I think you're right about the ASCII approach
provided
that the os, os.path tools can actually properly cope with
Unicode.

What I worry about is that if os.listdir() gives back
Unicode for
e.g. Latin-1 filenames and the application then passes the
Unicode
names to a C API using "s", prefectly working code will break...
then again the C code should really use "es" for decoding to
the Py_FileSystemDefaultEncoding as is done in e.g.
fileobject.c.

I really don't know what to do here...
History
Date User Action Args
2007-08-23 15:20:29adminlinkissue683592 messages
2007-08-23 15:20:29admincreate