This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pitrou, sable, vstinner
Date 2011-02-11.16:01:27
SpamBayes Score 1.2133427e-05
Marked as misclassified No
Message-id <1297440088.39.0.917162149099.issue11193@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-02-11 16:01:28vstinnersetrecipients: + vstinner, pitrou, sable
2011-02-11 16:01:28vstinnersetmessageid: <1297440088.39.0.917162149099.issue11193@psf.upfronthosting.co.za>
2011-02-11 16:01:27vstinnerlinkissue11193 messages
2011-02-11 16:01:27vstinnercreate