Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding.from_message incorrectly parses multi-line encoded headers #27

Open
wolever opened this issue Sep 9, 2013 · 0 comments
Open

Comments

@wolever
Copy link

wolever commented Sep 9, 2013

>>> msg = email.message_from_string("…")
>>> msg['Subject']
'=?ISO-8859-1?B?U2VuZCBkYQ==?=\n =?ISO-8859-1?B?dGEgZnJvbS==?='
>>> email.header.decode_header(msg['Subject'])
[('Send data from', 'iso-8859-1')] # The correct header
>>> clean_msg = lamson.encoding.from_message(msg)
>>> clean_msg['Subject']
u'Send da'  # Uh oh! Subject is getting truncated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant