Unicode entries on sys.path

Bengt Richter bokr at oz.net
Mon Dec 27 10:14:15 CET 2004


On Thu, 23 Dec 2004 19:24:58 +0100, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <martin at v.loewis.de> wrote:

>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.
>
What about removable drives? And mountable multiple file system types?
Maybe some collections of potentially homogenous file system references
such as sys.path need to be virtualized to carry relevant file system
encoding and protocol info etc. That could cover synthetic or compressed
info sources too, IWT. Homogeneous package representation could be a similar
problem, I guess.

Regards,
Bengt Richter



More information about the Python-list mailing list