On Tue, 2008-09-30 at 07:26 -0700, Guido van Rossum wrote: > > I am not convinced that a word processor can just ignore files with > > (what it thinks are) undecodable file names. In countries with a > > history of incompatible national encodings, such file names crop up very > > often, sometimes as a natural consequence of data migrating from older > > systems to newer ones. You can and do encounter "invalid" file names in > > the filesystems of mainstream users even without them using buggy or > > obsolete software. > > This is a quality of implementation issue. Either the word processor > is written to support "undecodable" files, or it isn't. If it isn't, > there's nothing that can be done about it (short of buying another > wordprocessor)
I agree with this. I just believe the underlying python APIs shouldn't make it impossible (or unnecessarily hard) for the word processor to implement showing of files with undecodable names. For example, implementing os.listdir to return the file names as Unicode subclasses with ability to access the underlying bytes (automatically recognized by open and friends) sounds like a good compromise that allows the word processor to both have the cake and eat it. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com