[issue37482] Email address display name fails with both encoded words and special chars
B Siemerink added the comment: Thank you all! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37482> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37482] Email address display name fails with both encoded words and special chars
Change by B Siemerink : -- pull_requests: +15090 pull_request: https://github.com/python/cpython/pull/15380 ___ Python tracker <https://bugs.python.org/issue37482> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37482] Email address display name fails with both encoded words and special chars
B Siemerink added the comment: Yes, you are right! The fix is to encode the special characters. -- ___ Python tracker <https://bugs.python.org/issue37482> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37482] Email address display name fails with both encoded words and special chars
B Siemerink added the comment: Hello David, thank you for the suggestion. Regarding your comment: > Either the comma should be encoded, or the "Foo Bar," should be in quotes. According to RFC5322 the display name cannot contain both a quoted part and an encoded word, so the only option is to encode the comma. Please let me know if I can do anything else. -- ___ Python tracker <https://bugs.python.org/issue37482> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37482] Email address display name fails with both encoded words and special chars
Change by B Siemerink : -- title: Email header fails with both encoded words and special chars -> Email address display name fails with both encoded words and special chars ___ Python tracker <https://bugs.python.org/issue37482> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37482] Email header fails with both encoded words and special chars
New submission from B Siemerink : Special characters in email headers are normally put within double quotes. However, encoded words (=?charset?x?...?=) are not allowed withing double quotes. When the header contains a word with special characters and another word that must be encoded, the first one must also be encoded. In the next example, The From header is quoted and therefore the comma is allowed; in the To header, the comma is not within quotes and not encoded, which is not allowed and rejected. From: "Foo Bar, France" To: Foo Bar, =?utf-8?q?Espa=C3=B1a?= -- components: email files: email_header_test.py messages: 347136 nosy: barry, bsiem, r.david.murray priority: normal severity: normal status: open title: Email header fails with both encoded words and special chars type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48452/email_header_test.py ___ Python tracker <https://bugs.python.org/issue37482> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com