Message42759
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... |
|
Date |
User |
Action |
Args |
2007-08-23 15:20:29 | admin | link | issue683592 messages |
2007-08-23 15:20:29 | admin | create | |
|