Unicode entries on sys.path

"Martin v. Löwis" martin at v.loewis.de
Thu Dec 23 13:24:58 EST 2004


Thomas Heller wrote:
> It seems that Python itself converts unicode entries in sys.path to
> normal strings using windows default conversion rules - is this a
> problem that I can fix by changing some regional setting on my machine?

You can set the system code page on the third tab on the XP
regional settings (character set for non-unicode applications).
This, of course, assumes that there is a character set that supports
all directories in sys.path. If you have Japanese characters on
sys.path, you certainly need to set the system locale to Japanese
(is that CP932?).

Changing this setting requires a reboot.

> Hm, maybe more a windows question than a python question...

The real question here is: why does Python not support arbitrary
Unicode strings on sys.path? It could, in principle, atleast on
Windows NT+ (and also on OSX). Patches are welcome.

Regards,
Martin



More information about the Python-list mailing list