Martin Panter added the comment: It looks like surrogate-escaped bytes should be supported thanks to Issue 8390, although this is not so useful if you use the “pax” format (which always uses UTF-8 internally).
To generate a surrogate-escaped string, you can “decode” it with the following error handler: >>> b"non-as\xA9ii".decode("ascii", "surrogateescape") 'non-as\udca9ii' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25997> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com