[Python-Dev] Python-3.0, unicode, and os.environ

rdmurray at bitdance.com rdmurray at bitdance.com
Sat Dec 6 06:15:44 CET 2008


On Sat, 6 Dec 2008 at 13:06, Steven D'Aprano wrote:
> Applications can deal with such weird file names. KDE's file manager
> (konqueror) and file selection dialog both show the character as a
> small square, presumably the font's missing character glyph, and KDE
> apps can open and save the file. Still speaking as a user, I think it
> is quite reasonable to expect applications to deal with undisplayable
> filenames: displaying the name and opening the file are orthogonal

Agreed.  I would file a bug report if an application couldn't
handle a file that validly exists in my file system, no matter
how broken the filename might appear to be.

> concepts, although I accept that command-line interfaces will have
> difficulty with file names that can't be typed by the user!

Difficult, but not impossible: tab completion in the shell can allow
the user to submit otherwise difficult to type filenames to a program.
Which means python should be able to handle such things in argument
strings, so that my python utilities can manipulate such files when
specified as command line arguments....and a sensible error should be
generated by default if the program hasn't been written in such a way
that it can handle such input.

It would be wonderful if all Unix variants would switch to all UTF-8 (I
have done so on my own machines...I think :).  But it is a slow process.

--RDM


More information about the Python-Dev mailing list