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

Oleg Broytmann phd at phd.pp.ru
Sat Dec 6 15:34:54 CET 2008


On Fri, Dec 05, 2008 at 08:37:45PM -0500, James Y Knight wrote:
> On Dec 5, 2008, at 7:48 PM, Nick Coghlan wrote:
>> You can't display a non-decodable filename to the user, hence the user
>> will have no idea what they're working on. Non-filesystem related apps
>> have no business trying to deal with insane filenames.
>
> Sigh, same arguments, all over again.
>
> Again, *both* KDE and Gnome apps display non-decodable filenames to the 
> user, and let the user work with the files. They display as good a  
> rendition as they can, using a replacement character as appropriate. In 
> some earlier versions, KDE did not work at all on poorly-encoded files, 
> and, users submitted bug reports. People do care, it does happen in real 
> life, and it is a bug in your software if you cannot deal with the users' 
> files. They just want the software to work. If it shows something weird 
> in the window titlebar, that's a bit irritating but at least it doesn't 
> get in the way of working.

   I agree 100%. Russian Unix users use at least 5 different encodings
(koi8-r, cp1251 and utf-8 are the most frequent in use, cp866 and
iso-8859-5 are less frequent). I have an FTP server with some filenames in
koi8 encoding - these filenames are for unix clients, - and some filenames
in cp1251 for w32 clients. Sometimes I run utf-8 xterm (I am
a commandline/console unixhead) for my needs (read email, write files in
utf-8 with characters beyond koi8-r, which is my primary encoding) - and
I still can work with filenames in koi8/cp1251 encodings. My filemanager
(Midnight Commander, for the matter) shows these files and directories as
"?????.???", but I can chdir to such directories, and I can open such
files. It would be a big bad blow for me if filemanagers (or other
programs) start to filter these filenames.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-Dev mailing list