[issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit
Vajrasky Kok
report at bugs.python.org
Thu Oct 31 05:29:11 CET 2013
Vajrasky Kok added the comment:
Okay, so for this case, what are the correct outputs for the cte and the message?
from email.charset import Charset
from email.message import Message
cs = Charset('utf-8')
cs.body_encoding = None # disable base64
msg = Message()
msg.set_payload('АБВ', cs)
msg.as_string() ==>
cte -> 7bit
message -> АБВ or \\u0410\\u0411\\u0412 or \xd0\x90\xd0\x91\xd0\x92?
msg.as_bytes() ==>
cte -> 8bit
message -> \\u0410\\u0411\\u0412 or \xd0\x90\xd0\x91\xd0\x92?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19063>
_______________________________________
More information about the Python-bugs-list
mailing list