[issue16948] email.mime.text.MIMEText: QP encoding broken with charset!=ISO-8859-1
Roundup Robot added the comment: New changeset 801cb3918212 by R David Murray in branch '3.2': #16948: Fix quopri encoding of non-latin1 character sets. http://hg.python.org/cpython/rev/801cb3918212 New changeset e644058e8e7b by R David Murray in branch '3.3': Merge: #16948: Fix quopri encoding of non-latin1 character sets. http://hg.python.org/cpython/rev/e644058e8e7b New changeset 009dc81e8bc9 by R David Murray in branch 'default': Merge: #16948: Fix quopri encoding of non-latin1 character sets. http://hg.python.org/cpython/rev/009dc81e8bc9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16948] email.mime.text.MIMEText: QP encoding broken with charset!=ISO-8859-1
R. David Murray added the comment: Fixed. I'm glad you caught this before the final release of 3.2. This is a bit of an embarrassing bug :(. -- resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16948] email.mime.text.MIMEText: QP encoding broken with charset!=ISO-8859-1
New submission from Jakub Wilk: If you try to create MIMEText object with text containing characters outside the ISO-8859-1 range, the quoted-printable encoder fails with KeyError: Python 3.2.3 (default, Sep 10 2012, 12:58:42) [GCC 4.7.1] on linux2 Type help, copyright, credits or license for more information. import email.mime.text email.mime.text.MIMEText('\u017c', 'plain', 'ISO-8859-2') Traceback (most recent call last): File /usr/lib/python3.2/email/message.py, line 331, in set_charset cte(self) TypeError: 'str' object is not callable During handling of the above exception, another exception occurred: Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.2/email/mime/text.py, line 30, in __init__ self.set_payload(_text, _charset) File /usr/lib/python3.2/email/message.py, line 296, in set_payload self.set_charset(charset) File /usr/lib/python3.2/email/message.py, line 333, in set_charset self._payload = charset.body_encode(self._payload) File /usr/lib/python3.2/email/charset.py, line 395, in body_encode return email.quoprimime.body_encode(string) File /usr/lib/python3.2/email/quoprimime.py, line 240, in body_encode if body_check(ord(c)): File /usr/lib/python3.2/email/quoprimime.py, line 81, in body_check return chr(octet) != _QUOPRI_BODY_MAP[octet] KeyError: 380 -- components: Library (Lib) messages: 179826 nosy: jwilk priority: normal severity: normal status: open title: email.mime.text.MIMEText: QP encoding broken with charset!=ISO-8859-1 versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16948] email.mime.text.MIMEText: QP encoding broken with charset!=ISO-8859-1
Changes by R. David Murray rdmur...@bitdance.com: -- components: +email nosy: +barry, r.david.murray versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com