[Python-Dev] readlink and unicode strings (SF:1580674) (original) (raw)
Ronald Oussoren ronaldoussoren at mac.com
Sun Oct 22 14:16:26 CEST 2006
- Previous message: [Python-Dev] readlink and unicode strings (SF:1580674) Patch http://www.python.org/sf/1580674 fixes readlink's behaviour w.r.t. Unicode strings: without this patch this function uses the system default encoding instead of the filesystem encoding to convert Unicode objects to plain strings. Like os.listdir, os.readlink will now return a Unicode object when the argument is a Unicode object. What I'd like to know is if this can be backported to the 2.5 branch. The first part of this patch (use filesystem encoding instead of the system encoding) is IMHO a bugfix, the second part might break existing applications (that might not expect a unicode result from os.readlink). The reason I did this patch is that os.path.realpath currently breaks when the path is a unicode string with non-ascii characters and at least one element of the path is a symlink. Ronald
- Next message: [Python-Dev] PSF Infrastructure has chosen Roundup as the issue tracker for Python development
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Oct 22, 2006, at 12:54 PM, Ronald Oussoren wrote a message with an
annoyingly large subject...
Sorry about that, I guess it's time to book a course on basic
computer usage :-(
Ronald
-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20061022/c8f8260e/attachment.bin
- Previous message: [Python-Dev] readlink and unicode strings (SF:1580674) Patch http://www.python.org/sf/1580674 fixes readlink's behaviour w.r.t. Unicode strings: without this patch this function uses the system default encoding instead of the filesystem encoding to convert Unicode objects to plain strings. Like os.listdir, os.readlink will now return a Unicode object when the argument is a Unicode object. What I'd like to know is if this can be backported to the 2.5 branch. The first part of this patch (use filesystem encoding instead of the system encoding) is IMHO a bugfix, the second part might break existing applications (that might not expect a unicode result from os.readlink). The reason I did this patch is that os.path.realpath currently breaks when the path is a unicode string with non-ascii characters and at least one element of the path is a symlink. Ronald
- Next message: [Python-Dev] PSF Infrastructure has chosen Roundup as the issue tracker for Python development
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]