[Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Giovanni Bajo
Hello, CPython 2.x (and 3.x) under Win32 has an issue with sys.argv. The list is computed using the ANSI version of the windows APIs[*]. The problem is apparent when you have a file/directory which can't be represented in the system encoding (eg: a japanese-named file or directory on a Western

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Giovanni Bajo
On Sat, 16 Feb 2008 07:49:22 -0800, Guido van Rossum wrote: > Thanks for reminding us of this! > > Is there any chance that you can submit a patch (or even the beginnings > of one) for this? Sure, during next week. I'd appreciate if, meanwhile, a core developer commented on my proposal at the C

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Guido van Rossum
Thanks for reminding us of this! Is there any chance that you can submit a patch (or even the beginnings of one) for this? At the very least, can you add the issue to the tracker so we'll have a permanent reminder until it's resolved? On Feb 16, 2008 7:20 AM, Giovanni Bajo <[EMAIL PROTECTED]> wr

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Giovanni Bajo
On Sat, 16 Feb 2008 17:51:08 +0100, Christian Heimes wrote: > In the last months Amaury, Martin von Löwis and I have done most of the > Windows work. Any help from an experienced Windows developer is greatly > appreciated! We *need* an additional Windows developer. I would really like to help you

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Phillip J. Eby
At 05:06 PM 2/16/2008 +, Giovanni Bajo wrote: >BTW: is there a long-time plan to make the Python core *not* link >against msvcrt dll anymore but only rely on Windows APIs (or maybe >also the static C runtime, I don't really care)? How would this affect using MinGW to build Python extensions?

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Paul Moore
On 16/02/2008, Christian Heimes <[EMAIL PROTECTED]> wrote: > In the last months Amaury, Martin von Löwis and I have done most of the > Windows work. Any help from an experienced Windows developer is greatly > appreciated! We *need* an additional Windows developer. Is there a list anywhere of tasks

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Giovanni Bajo
On Sat, 16 Feb 2008 12:40:52 -0500, Phillip J. Eby wrote: >>BTW: is there a long-time plan to make the Python core *not* link >>against msvcrt dll anymore but only rely on Windows APIs (or maybe also >>the static C runtime, I don't really care)? > > How would this affect using MinGW to build Pyth

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Paul Moore
On 16/02/2008, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > On Sat, 16 Feb 2008 12:40:52 -0500, Phillip J. Eby wrote: > > >>BTW: is there a long-time plan to make the Python core *not* link > >>against msvcrt dll anymore but only rely on Windows APIs (or maybe also > >>the static C runtime, I don't r

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Christian Heimes
Giovanni Bajo wrote: > Sure, during next week. I'd appreciate if, meanwhile, a core developer > commented on my proposal at the C level, so that I don't write a totally > wrong patch to begin with. I'm not really familiar with CPython hacking. We have dropped support for 9x, ME and NT4 for the 2

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Giovanni Bajo
On Sat, 16 Feb 2008 18:29:07 +, Paul Moore wrote: >> >>BTW: is there a long-time plan to make the Python core *not* link >> >>against msvcrt dll anymore but only rely on Windows APIs (or maybe >> >>also the static C runtime, I don't really care)? >> > >> > How would this affect using MinGW to

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Martin v. Löwis
> BTW: is there a long-time plan to make the Python core *not* link against > msvcrt dll anymore but only rely on Windows APIs (or maybe also the > static C runtime, I don't really care)? I have plans to reduce usage of the CRT as much as possible. I don't believe that linking statically would a

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Martin v. Löwis
> If you avoided the static CRT, and only used Windows APIs, that would > avoid this issue, but that means reimplementing everything - > malloc/free, FILE*, stdin/stdout/stderr, etc etc. I don't think anyone > is contemplating that. Actually, I am. Py3k will already remove usage of stdio, for file

Re: [Python-3000] Windows, sys.argv and unicode

2008-02-16 Thread Paul Moore
On 16/02/2008, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > If you avoided the static CRT, and only used Windows APIs, that would > > avoid this issue, but that means reimplementing everything - > > malloc/free, FILE*, stdin/stdout/stderr, etc etc. I don't think anyone > > is contemplating that

Re: [Python-3000] malloc on Windows (Was: Windows, sys.argv and unicode)

2008-02-16 Thread Martin v. Löwis
>>> If you avoided the static CRT, and only used Windows APIs, that would >>> avoid this issue, but that means reimplementing everything - >>> malloc/free, FILE*, stdin/stdout/stderr, etc etc. I don't think anyone >>> is contemplating that. >> Actually, I am. > > I stand corrected :-) If you need