[issue19662] smtpd.py should not decode utf-8

R. David Murray report at bugs.python.org
Fri Feb 7 03:38:31 CET 2014


R. David Murray added the comment:

Unfortunately I did not get to this before the 3.4 beta release, so no, it won't be fixed in 3.4.

You can work around it by overriding collect_incoming_data in your subclass and doing data.decode('ascii', 'surrogateescape') instead of str(data, 'utf-8'), and then doing mydata.encode('ascii', 'surrogateescape') at the point where you want to turn the data back into binary.

----------

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


More information about the Python-bugs-list mailing list