This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients r.david.murray, sdaoden
Date 2011-03-17.00:17:31
SpamBayes Score 2.7607418e-06
Marked as misclassified No
Message-id <1300321052.66.0.838170391812.issue11243@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-03-17 00:17:32r.david.murraysetrecipients: + r.david.murray, sdaoden
2011-03-17 00:17:32r.david.murraysetmessageid: <1300321052.66.0.838170391812.issue11243@psf.upfronthosting.co.za>
2011-03-17 00:17:31r.david.murraylinkissue11243 messages
2011-03-17 00:17:31r.david.murraycreate