Nick Coghlan added the comment:
Draft docstring for that version
def convert_surrogates(data, errors='replace'):
"""Convert escaped surrogates by applying a different error handler
Uses the "replace" error handler by default, but any input
error handler may be specified.
"""
return data.encode('utf-8', 'surrogateescape').decode('utf-8', errors)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18814>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com