[issue9167] argv double encoding on OSX

2010-10-22 Thread STINNER Victor
STINNER Victor added the comment: FYI, you should use ascii() instead of a.encode(\"utf8\") to dump arguments. It's easier to check '\u2603' than b'\xe2\x98\x83' for me :-) So the bug is fixed in Python 3.2, great! I was thinking that we need a test for that, but then I remembered that I alre

[issue9167] argv double encoding on OSX

2010-10-21 Thread R. David Murray
R. David Murray added the comment: rdmur...@buddy:~/python/py3k>uname -a Darwin buddy.home.bitdance.com 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 rdmur...@buddy:~/python/release31-maint>LC_ALL="C" ./python.exe Python 3.1.2 (releas

[issue9167] argv double encoding on OSX

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: Thank you. I'll check, but probably only sometime next week. -- ___ Python tracker ___ ___ Python-b

[issue9167] argv double encoding on OSX

2010-10-20 Thread STINNER Victor
STINNER Victor added the comment: I just closed #4388 with r85765 (Python 3.2): always use UTF-8 to decode the command line arguments on Mac OS X, not the locale encoding. I suppose that it does fix this issue. Can someone check that? -- ___ Python

[issue9167] argv double encoding on OSX

2010-07-26 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: Ronald, Thank you for the interest. For me trying to deal with such a tricky issue on a system whose Best Before date is already passed would be a waste of time. I was only interested in factor out the bugs in my extension module from the ones not under my

[issue9167] argv double encoding on OSX

2010-07-25 Thread STINNER Victor
STINNER Victor added the comment: Issue #8622 proposes the creation of an environment variable PYTHONFSENCODING. It will be used to set sys.getfilesystemencoding(). Would it help this issue? -- ___ Python tracker

[issue9167] argv double encoding on OSX

2010-07-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: Using the CF API to fetch the system encoding won't work: Using PyObjC: >>> CFStringConvertEncodingToIANACharSetName(CFStringGetSystemEncoding()) u'macintosh' There doesn't seem to be another way to extract the prefered encoding from the system. I see two p

[issue9167] argv double encoding on OSX

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: > This may be very hard to fix I wrote a patch to fix this problem: see #8775. -- ___ Python tracker ___ __

[issue9167] argv double encoding on OSX

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Daniele: never mind, you already said you are on OSX 10.4. The current behavior is only a problem when the system default encoding as implied by LANG is different from the fileystem encoding. How to fix this is an entirely different question: most (all?) uni

[issue9167] argv double encoding on OSX

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Daniele: which version of OSX do you use? And if you use OSX 10.5 or 10.6: which is your system language according to system preferences (the topmost entry in the list of the "Language and Text" preference pane, whose icon looks a little like a UN flag. I

[issue9167] argv double encoding on OSX

2010-07-06 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: I've made some other test with LANG=C on other platforms. It seems resulting in a clean error on Linux: $ LANG=C ./here/bin/python3 Python 3.2a0 (py3k, Jul 6 2010, 12:40:29) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more in

[issue9167] argv double encoding on OSX

2010-07-06 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: Attached patch with test cases to check sys.argv and sys.executable. The tests fail against the daily snapshot, so adding python 3.2 to the affected versions. Variable __CF_USER_TEXT_ENCODING is undefined. Locale of the system is C: $ locale LANG= LC_COLLA

[issue9167] argv double encoding on OSX

2010-07-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: BTW. My 3.1 build is: release31-maint:80235M, which is slightly newer that the 3.1.2 release. -- ___ Python tracker ___ __

[issue9167] argv double encoding on OSX

2010-07-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: I cannot reproduce this with both 3.1.2 and 3.2a (py3k:80693), in both cases I get the same output as you do on Linux. This is on OSX 10.6 though, I haven't tested on 10.4 yet. What is the output of the locale command on your OSX system? Mine says: $ loca

[issue9167] argv double encoding on OSX

2010-07-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> ronaldoussoren components: +Macintosh, Unicode nosy: +ezio.melotti, ronaldoussoren stage: -> unit test needed ___ Python tracker ___ __

[issue9167] argv double encoding on OSX

2010-07-05 Thread R. David Murray
Changes by R. David Murray : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue9167] argv double encoding on OSX

2010-07-05 Thread Daniele Varrazzo
New submission from Daniele Varrazzo : Looks like the wchar_t* array returned by Py_GetArgcArgv() on OSX suffers by double encoding. This can affect sys.argv, sys.executable and C code relying on the above function of course. On Linux: $ python3 Python 3.0rc1+ (py3k, Oct 28 2008, 09:22:29) [