Re: Unicode entries on sys.path

2004-12-30 Thread JanC
vincent wehren schreef: > Normally I would have thought this would require using the Microsoft > Layer for Unicode (unicows.dll). If Python is going to use unicows.dll, it might want to use libunicows for compatibility with mingw etc.: -- JanC "Be strict

Re: Unicode entries on sys.path

2004-12-30 Thread "Martin v. Löwis"
vincent wehren wrote: FindFirstFile does not seem to be one of them - unless the list on htpp://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/other_existing_unicode_support.asp) is bogus (?). It might perhaps be misleading: I think the entry points are there, but calling

Re: Unicode entries on sys.path

2004-12-30 Thread vincent wehren
Thomas Heller wrote: "Martin v. Löwis" <[EMAIL PROTECTED]> writes: Thomas Heller wrote: How should these patches be approached? Please have a look as to how posixmodule.c and fileobject.c deal with this issue. On windows, it would probably be easiest to use the MS generic text routines: _tcslen i

Re: Unicode entries on sys.path

2004-12-29 Thread "Martin v. Löwis"
Thomas Heller wrote: I wasn't asking about the *W functions, I'm asking about string/unicode handling in Python source files. Looking into Python/import.c, wouldn't it be required to change the signature of a lot of functions to receive PyObject* arguments, instead of char* ? Yes, that would be one

Re: Unicode entries on sys.path

2004-12-29 Thread Thomas Heller
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> How should these patches be approached? > > Please have a look as to how posixmodule.c and fileobject.c deal with > this issue. > >> On windows, it would probably >> be easiest to use the MS generic text routines: _tcslen inst

Re: Unicode entries on sys.path

2004-12-27 Thread "Martin v. Löwis"
Thomas Heller wrote: How should these patches be approached? Please have a look as to how posixmodule.c and fileobject.c deal with this issue. On windows, it would probably be easiest to use the MS generic text routines: _tcslen instead of strlen, for example, and to rely on the _UNICODE preproce

Re: Unicode entries on sys.path

2004-12-27 Thread "Martin v. Löwis"
Bengt Richter wrote: 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? I'm not sure I understand

Re: Unicode entries on sys.path

2004-12-27 Thread Thomas Heller
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > 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 se

Re: Unicode entries on sys.path

2004-12-27 Thread Bengt Richter
On Thu, 23 Dec 2004 19:24:58 +0100, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> 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

Re: Unicode entries on sys.path

2004-12-26 Thread "Martin v. Löwis"
Just wrote: 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. Works for me on OSX 10.3.6, as it should: prior to using the sys.path entry, a unicode string is encoded

Re: Unicode entries on sys.path

2004-12-24 Thread Just
In article <[EMAIL PROTECTED]>, vincent wehren <[EMAIL PROTECTED]> wrote: > Just wrote: > > In article <[EMAIL PROTECTED]>, > > "Martin v. Lowis" <[EMAIL PROTECTED]> wrote: > > > > > >>>Hm, maybe more a windows question than a python question... > >> > >>The real question here is: why does Pyt

Re: Unicode entries on sys.path

2004-12-24 Thread vincent wehren
Just wrote: In article <[EMAIL PROTECTED]>, "Martin v. Lowis" <[EMAIL PROTECTED]> wrote: 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 al

Re: Unicode entries on sys.path

2004-12-24 Thread Just
In article <[EMAIL PROTECTED]>, "Martin v. Lowis" <[EMAIL PROTECTED]> wrote: > > 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 a

Re: Unicode entries on sys.path

2004-12-23 Thread "Martin v. Löwis"
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 set