James Y Knight wrote:
FWIW: Qt works fine with undecodeable filenames, and it too uses unicode strings everywhere in its API. I looked into what it does, and found that it uses your (Martin)'s original idea for solving this: it stores undecodeable bytes as characters from 0x10fe00 to 0x10feff (which is valid private-use codespace). While that might not be ideally correct, since you lose those 256 PUA characters, even that is IMO better than pushing out bytes to every API, or worse, giving up and just having python unable to access files, as it is now.
If Python uses a bit of the PUA (but only for filenames), which I think it should be free to do, then the manual should document that fact and when and why. Then any Python app that needs to use the full PUA could do so as long as it either avoids mixing filenames with its strings or avoids working with invalid filenames.
The referenced QT file is licenced GPL2. _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com