[issue18679] include a codec to handle escaping only control characters but not any others

Serhiy Storchaka report at bugs.python.org
Thu Aug 8 17:45:07 CEST 2013


Serhiy Storchaka added the comment:

ast.literal_eval("'%s'" % e)
e.encode().decode('unicode-escape').encode('latin1').decode()
e.encode('latin1', 'backslashescape').decode('unicode-escape')

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list