[issue2128] sys.argv is wrong for unicode strings

2013-01-14 Thread STINNER Victor
STINNER Victor added the comment: > is it correct that this bug no longer appears in Python 2.7.3? Martin wrote that it cannot be fixed in Python 2: "For 2.6, I don't think fixing it is feasible." The "fix" is to upgrade your application to Python 3. -- __

[issue2128] sys.argv is wrong for unicode strings

2013-01-13 Thread Michael Herrmann
Michael Herrmann added the comment: Hi, is it correct that this bug no longer appears in Python 2.7.3? I checked the changelogs of 2.7, but couldn't find anything. Thanks! Michael -- nosy: +mherrmann.at ___ Python tracker

[issue2128] sys.argv is wrong for unicode strings

2011-01-14 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue2128] sys.argv is wrong for unicode strings

2011-01-08 Thread David-Sarah Hopwood
David-Sarah Hopwood added the comment: Sorry, missed out the imports: from ctypes import WINFUNCTYPE, windll, POINTER, byref, c_int from ctypes.wintypes import LPWSTR, LPCWSTR -- ___ Python tracker ___

[issue2128] sys.argv is wrong for unicode strings

2011-01-08 Thread David-Sarah Hopwood
David-Sarah Hopwood added the comment: The following code is being used to work around this issue for Python 2.x in Tahoe-LAFS: # This works around . GetCommandLineW = WINFUNCTYPE(LPWSTR)(("GetCommandLineW", windll.kernel32)) CommandLineToArgvW = W

[issue2128] sys.argv is wrong for unicode strings

2008-04-07 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Martin, you are right that they are not from the same reason as that issue. gcc -c -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./I

[issue2128] sys.argv is wrong for unicode strings

2008-04-06 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: What warnings precisely are you seeing? I didn't see anything in the 3k branch (not even for #2388, as PyErr_Format doesn't have the GCC format attribute in 3k, unlike 2.x). __ Tracker <[EMAIL PROTECTED]>

[issue2128] sys.argv is wrong for unicode strings

2008-04-06 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: MvL's recent commit creates compiler warnings for Unicode UCS4 for the same reason as #2388. -- nosy: +benjamin.peterson __ Tracker <[EMAIL PROTECTED]> ___

[issue2128] sys.argv is wrong for unicode strings

2008-04-05 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: This is now fixed in r62178 for Py3k. For 2.6, I don't think fixing it is feasible. -- resolution: -> fixed status: open -> closed versions: -Python 2.6 __ Tracker <[EMAIL PROTECTED]>

[issue2128] sys.argv is wrong for unicode strings

2008-03-10 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Here is a patch that redoes the entire argv handling, in terms of wchar_t. As a side effect, it also changes the sys.path handling to use wchar_t. -- keywords: +patch Added file: http://bugs.python.org/file9647/wchar.diff __

[issue2128] sys.argv is wrong for unicode strings

2008-02-21 Thread Martin v. Löwis
Martin v. Löwis added the comment: > mbstowcs uses LC_CTYPE. Is that correct and consistent with the way > default encoding under UNIX is handled by Py3k? It's correct, but it's not consistent with the default encoding - there isn't really any default encoding in Py3k. More specifically, PyUnico

[issue2128] sys.argv is wrong for unicode strings

2008-02-21 Thread Giovanni Bajo
Giovanni Bajo added the comment: mbstowcs uses LC_CTYPE. Is that correct and consistent with the way default encoding under UNIX is handled by Py3k? Would a Py_MainW or similar wrapper be easier on the UNIX guys? I'm just asking, I don't have a definite idea. __

[issue2128] sys.argv is wrong for unicode strings

2008-02-21 Thread Martin v. Löwis
Martin v. Löwis added the comment: I dislike the double decoding, and would prefer if sys.argv would be created directly from the wide command line. In addition, I think the patch is incorrect: it ignores the arguments to Py_Main, which is a documented API function. One solution might be to dec

[issue2128] sys.argv is wrong for unicode strings

2008-02-17 Thread Giovanni Bajo
Giovanni Bajo added the comment: I'm attaching a simple patch that seems to work under Py3k. The trick is that Py3k already attempts (not sure how or why) to decode argv using utf-8. So it's sufficient to setup argv as UTF8-encoded strings. Notice that brings the output of "python à" from th

[issue2128] sys.argv is wrong for unicode strings

2008-02-16 Thread Christian Heimes
Christian Heimes added the comment: The issue is related to #1342 Since we have dropped support for older versions of Windows (9x, ME, NT4) I like to get the Python interface to argv, env and files fixed. -- components: +Windows nosy: +tiran priority: -> high versions: +Python 2.6 ___

[issue2128] sys.argv is wrong for unicode strings

2008-02-16 Thread Giovanni Bajo
New submission from Giovanni Bajo: Under Windows, sys.argv is created through the Windows ANSI API. 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 Windows), Windows will encode the filename to the system enc