R. David Murray <rdmur...@bitdance.com> added the comment:
Yeah, I think we need a complete example here. Note that in the general case there is no such thing as an RFC-valid email in unicode (which is what python strings are), though with utf8=True and an email involving only text you might get away with it. I assume you've tried policy=policy.default.clone(utf=True) when creating the email? It will probably help to encode the 'text' to utf8 and use message_from_bytes to read it, but that may not be your only problem. It depends on exactly what is in the message and how the message gets recorded in your XML whether this is even going to work in the general case. The xml conversion may have already lost information, but hopefully not. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43333> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com