R. David Murray <rdmur...@bitdance.com> added the comment: Steffen, what you are doing in 11243-test is not something that the current email package supports. String input to message_as_string must be ASCII only in email 5.1/python3.2. Likewise for decode_header. To get unicode in to a header, you have to pass it in to the constructor of Header, and then it encodes it as an encoded word in whatever character set you tell it to use.
The make_header(decode_header(stuff)) would theoretically return stuff, except that as you can see if stuff is non-ascii (or a Header), it won't work. If you are handling 'dirty' data, you have to stick to the binary interfaces, as discussed. Header needs a binary interface, but it doesn't have one (yet?). Yes, this interface is not an optimal interface. That's what email6 is about :) So, absent a minimal failing test case, I'm going to commit the patch. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11243> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com