Message76242
Here's a minimal failing example, which I believe captures the cause of
the test_cmd_line failure. After "export LANG=C", on OS X 10.5, I get:
Python 3.0rc3+ (py3k:67335, Nov 22 2008, 09:11:58)
[GCC 4.0.1 (Apple Inc. build 5488)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, posix
>>> sys.getfilesystemencoding()
'utf-8'
>>> posix.execv(sys.executable, [sys.executable, '-c', "ord('\xe9')"])
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: ord() expected a character, but string of length 2 found
Clearly the single '\xe9' character is being encoded in utf8 as
b'\xc3\xa9', and the python interpreter invoked by the execv ends up
receiving two characters here instead of one.
The encoding happens at around line 2988 of posixmodule.c, in posix_execv. |
|
Date |
User |
Action |
Args |
2008-11-22 12:37:18 | mark.dickinson | set | recipients:
+ mark.dickinson, MrJean1 |
2008-11-22 12:37:18 | mark.dickinson | set | messageid: <1227357438.29.0.284317754629.issue4388@psf.upfronthosting.co.za> |
2008-11-22 12:37:17 | mark.dickinson | link | issue4388 messages |
2008-11-22 12:37:16 | mark.dickinson | create | |
|