STINNER Victor <victor.stin...@haypocalc.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11193>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to