Bug report
Bug description:
The following illustrates the issue.
>>> # Here's an example file
>>> with open('badx2.eml') as fp:
... print(fp.read())
...
From: "Sweepstakes Alert–Dyson Vacuum" <DysonVacuumSweeps@stellaryx.space>
body
>>> # Note that the `–` above is a unicode En Dash
>>> # Make a message object
>>> from email import message_from_binary_file
>>> with open('badx2.eml', 'rb') as fp:
... msg = message_from_binary_file(fp)
...
>>> # and look at it
>>> print(msg.as_string())
From: =?unknown-8bit?q?=22Sweepstakes_Alert=E2=80=93Dyson_Vacuum=22_=3CDysonVacuumSweeps=40stellaryx=2Espace=3E?=
body
>>> # Note that the email address is improperly included in the encoded word
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Bug report
Bug description:
The following illustrates the issue.
CPython versions tested on:
3.13
Operating systems tested on:
Linux