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, cnicodeme, r.david.murray
Date 2018-07-19.15:18:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
That does appear to be a bug.  Note that the new email API handles it correctly:

    >>> x = """
    ... > From: =?utf-8?Q?
    ...  =?utf-8?Q?=E3=82=83=E3=82=85=E3=81=87=E3=81=BA=E3=81=BD=E3=81=BC"\=E3?=
    ...  =?utf-8?Q?=81=A9=E3=81=A5=E3=81=A2l=E3=81=A0=E3=81=B0=E3=81=A8=E3=81?=
    ...  =?utf-8?Q?=8FKL=E3=81=84=E3=82=8C=E3=82=8B=E3=82=86>KL=E3=82=89JF?=
    ...  <>
    ... """
    >>> from email import message_from_string
    >>> from email.policy import default
    >>> m = message_from_string(x+'\n\ntest', policy=default)
    >>> m['from']
    '"ゆ↑ゆ ゃゅぇぺぽぼ\\"\\\\� ��づぢlだばと� �KLいれるゆ>KLらJF" <>'
    >>> m['from'].addresses[0].addr_spec
    >>> m['from'].addresses[0].display_name
    'ゆ↑ゆ ゃゅぇぺぽぼ"\\\udce3 \udc81\udca9づぢlだばと\udce3\udc81 \udc8fKLいれるゆ>KLらJF'

I'm not particularly interested myself in fixing parseaddr to handle this case correctly, since it is the legacy API, but if someone else wants to I'll review the patch.
Date User Action Args
2018-07-19 15:18:03r.david.murraysetrecipients: + r.david.murray, barry, cnicodeme
2018-07-19 15:18:03r.david.murraysetmessageid: <>
2018-07-19 15:18:03r.david.murraylinkissue34155 messages
2018-07-19 15:18:03r.david.murraycreate