[Python-Dev] Unicode strings as filenames (original) (raw)
Jack Jansen jack@oratrix.nl
Sun, 06 Jan 2002 22:36:45 +0100
- Previous message: [Python-Dev] Add platform.py to the standard lib ?!
- Next message: [Python-Dev] Unicode strings as filenames
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Recently, "Martin v. Loewis" <martin@v.loewis.de> said:
> This change works for me on Windows 2000 and allows access to all files > no matter what the current code page is set to. On Windows 9x (not yet > tested), the wfopen call should fail causing a fallback to fopen. Possibly > the OS should be detected instead and wfopen not attempted on 9x.
Now that you have that change, please try to extend it to posixmodule.c. This is where I gave up. Notice that, with changing PyFileSystemDefaultEncoding and open() alone, you have worsened the situation: os.stat will now fail on files with non-ASCII names on which it works under the mbcs encoding, because windows won't find the file (correct me if I'm wrong).
Could someone who really understands this issue (Martin?) perhaps write a test case for this? I think something like creating a file with some nonascii chars in the name, and verifying that open(), readdir(), os.stat() and various others work as expected is what would be needed (but I'm not sure I fully understand it:-).
- Jack Jansen <Jack.Jansen@oratrix.com> http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma Goldman -
- Previous message: [Python-Dev] Add platform.py to the standard lib ?!
- Next message: [Python-Dev] Unicode strings as filenames
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]