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 gkuenning, r.david.murray
Date 2017-12-13.02:54:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513133651.04.0.213398074469.issue32298@psf.upfronthosting.co.za>
In-reply-to
Content
And of course tools can grep for "foo@bar.com": you can't use encoded words in an address, only in the display name.

However, it occurs to me that in fact the restriction applies only to phrases, so one could use a less restrictive character set in an unstructured header such as the Subject, and that would indeed be nice.  The old header folder (python 2.7 and python 3.x compat32 policy) can't do it, because they don't know anything about the syntax of the headers they fold, they just use a bunch of heuristics.  The new policies in python3, however, use a smarter folder from _header_value_parser, and that *does* have access to the full parse tree for the header, and so could make smart decisions about which character set to use for the encoded word encoding.

If you'd like to try your hand at a PR implementing this idea, I'll be happy to provide advice and do a review.  It's not going to be anywhere near as simple as the one line change you proposed here, though :)
History
Date User Action Args
2017-12-13 02:54:11r.david.murraysetrecipients: + r.david.murray, gkuenning
2017-12-13 02:54:11r.david.murraysetmessageid: <1513133651.04.0.213398074469.issue32298@psf.upfronthosting.co.za>
2017-12-13 02:54:11r.david.murraylinkissue32298 messages
2017-12-13 02:54:10r.david.murraycreate