[issue16444] Use support.TESTFN_UNDECODABLE on UNIX

Serhiy Storchaka report at bugs.python.org
Fri Nov 9 12:09:49 CET 2012


Serhiy Storchaka added the comment:

Try b'\xed\xb2\x80' and b'\xed\xb4\x80' for UTF-8 (on Unix and Mac OS X).

b'\xed\xb2\x80' is b'\x80'.decode('utf-8', 'surrogateescape').encode('utf-8', 'surrogatepass').
b'\xed\xb4\x80' is '\udd00'.encode('utf-8', 'surrogatepass') and '\udd00' can't be encoded with surrogateescape.

----------

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


More information about the Python-bugs-list mailing list