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.

作者 r.david.murray
收信人 georg.brandl, giampaolo.rodola, holdenweb, lregebro, pitrou, r.david.murray, rhettinger, sdaoden, vstinner
日期 2011-01-28.20:58:22
SpamBayes Score 0.0001126693
Marked as misclassified
Message-id <1296248303.19.0.710873101882.issue9124@psf.upfronthosting.co.za>
In-reply-to
内容
Well, that's a bunch of code, and I'm afraid I don't know what your answer to my question was.  What error do you get now if you use the new version of mailbox3.patch?

If you feed the new mailbox/email bytes, it will preserve the bytes as is, as long as you don't try to convert the invalid headers to strings.  If you convert them to string (by accessing them through the Message object), it will encode them as 'unknown-8bit' using quopri or base64 as appropriate (ie: depending on how many non-ascii chars there are).  If you want instead to guess that they are latin-1, you can call decode_header on the stringified version to get back the original bytes, and then substitute your preferred guessed charset for the 'unknown-8bit' charset and go from there to unicode.  (For Python3.3 I plan to provide tools to make this kind of processing much simpler.)
历史
日期 用户 动作 参数
2011-01-28 20:58:23r.david.murray修改recipients: + r.david.murray, georg.brandl, rhettinger, holdenweb, pitrou, vstinner, giampaolo.rodola, lregebro, sdaoden
2011-01-28 20:58:23r.david.murray修改messageid: <1296248303.19.0.710873101882.issue9124@psf.upfronthosting.co.za>
2011-01-28 20:58:22r.david.murray链接issue9124 messages
2011-01-28 20:58:22r.david.murray创建