[issue16444] Use support.TESTFN_UNDECODABLE on UNIX

STINNER Victor report at bugs.python.org
Sun Nov 11 23:15:48 CET 2012


STINNER Victor added the comment:

> I suppose you noticed you broke a bunch of buildbots :)

Failures occur on FreeBSD, OpenIndiana and some other buildbots which don't set a locale and so use the "C" locale. main() decodes command line arguments from the locale encoding using _Py_char2wchar(). On these OSes, the "C" locale uses the ISO-8859-1 encoding, but the problem is that nl_langinfo(CODESET) announces ASCII :-/ test_cmd_line.test_undecodable_code() handles this case. Extract of a comment:

# _Py_char2wchar() decoded b'\xff' as '\xff' even if the locale is  
# C and the locale encoding is ASCII. It occurs on FreeBSD, Solaris 
# and Mac OS X.                                                     

Mac OS X is now using UTF-8 to decode the command line arguments.

I just created the issue #16455 to fix FreeBSD and OpenIndiana.

I propose to close this issue because I consider it as fixed (#16455 will reenable TESTFN_UNDECODABLE in test_cmd_line_script).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16444>
_______________________________________


More information about the Python-bugs-list mailing list