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 barry, docs@python, hniksic, r.david.murray
Date 2013-03-21.18:41:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I agree that this is not the worlds best API.  However, it is the API that we have in 2.7/3.2, and we can't change how Header.__unicode__ behaves without breaking backward compatibility.  

What we could do is add an example of how to use this API to get unicode strings to the top of the docs:

   >>>  unicode(make_header(decode_header('=?gb2312?b?1eLKx9bQzsSy4srUo6E=?=')))

But you already know about that.

In Python 3.3 you get this:

   >>> msg = message_from_string("subject: =?gb2312?b?1eLKx9bQzsSy4srUo6E=?=\n\n", policy=default)
   >>> msg['subject']

So, I'll make this a doc bug.
Date User Action Args
2013-03-21 18:41:46r.david.murraysetrecipients: + r.david.murray, barry, hniksic, docs@python
2013-03-21 18:41:46r.david.murraysetmessageid: <>
2013-03-21 18:41:46r.david.murraylinkissue17505 messages
2013-03-21 18:41:46r.david.murraycreate