Author vstinner
Recipients pitrou, sable, vstinner
Date 2011-02-11.16:01:27
SpamBayes Score 1.21334e-05
Marked as misclassified No
Message-id <>
test_undecodable_code() in test_cmd_line had a similar issue: on FreeBSD, Solaris and Mac OS X, even if the locale is C (and nl_langinfo(CODESET) announces ASCII), _Py_char2wchar() (mbstowcs) decoded b'\xff' as '\xff' (use ISO-8859-1 encoding). To fix the test, I just patched the test to accept both results: b'\xff' may be decoded as '\udcff' or '\xff'.

test_undecodable_env does something like: os.environb[b'test']=b'abc\xff', but os.getenv() decodes b'abc\xff' as 'abc\xff' instead of 'abc\udcff' even if LC_ALL=C.

I don't understand why the test pass on FreeBSD, Solaris and Mac OS X, but not on AIX. It would be interesting to get the locale encoding of the child process using LC_ALL=C.
Date User Action Args
2011-02-11 16:01:28vstinnersetrecipients: + vstinner, pitrou, sable
2011-02-11 16:01:28vstinnersetmessageid: <>
2011-02-11 16:01:27vstinnerlinkissue11193 messages
2011-02-11 16:01:27vstinnercreate