Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

I would prefer to use the backslashreplace error handler rather of the 
unicode-escape codec. Just as few lines above, but with ASCII encoding.

    msg = msg.encode('ascii', 'backslashreplace').decode('ascii')

It is still not clear to me why the current code purposed to handle this 
problem doesn't work in this case. We need to find the cause and fix the 
existing solution.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34421>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to