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 kxroberto, r.david.murray
Date 2012-01-02.17:43:26
SpamBayes Score 0.00047321102
Marked as misclassified No
Message-id <1325526207.3.0.418282512916.issue13693@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, no, the local part cannot be in anything other than ascii (see RFC 5335, which desires to address this problem among others).  Also, an encoded word cannot occur inside quotation marks.  If you correct those two bugs, you can generate an RFC-valid address using Header.append.

There is a project underway to make all of this header parsing and formatting stuff work better: see the http://pypi.python.org/pypi/email.

By the way, this is easier already in python 3.2.  There you can do:

   >>> formataddr(('Nameß', 'weofij@fjeio'))
   '=?utf-8?b?TmFtZcOf?= <weofij@fjeio>'
History
Date User Action Args
2012-01-02 17:43:27r.david.murraysetrecipients: + r.david.murray, kxroberto
2012-01-02 17:43:27r.david.murraysetmessageid: <1325526207.3.0.418282512916.issue13693@psf.upfronthosting.co.za>
2012-01-02 17:43:26r.david.murraylinkissue13693 messages
2012-01-02 17:43:26r.david.murraycreate