diff options
-rw-r--r-- | Mailman/Queue/CommandRunner.py | 3 | ||||
-rw-r--r-- | NEWS | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index 6ea50255..a2a9dab7 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -100,6 +100,9 @@ class Results: # E.g the outer Content-Type: was text/html return body = part.get_payload(decode=True) + if (part.get_content_charset(None)): + body = unicode(body, part.get_content_charset()).encode( + Utils.GetCharSet(self.msgdata['lang'])) # text/plain parts better have string payloads assert isinstance(body, StringType) or isinstance(body, UnicodeType) lines = body.splitlines() @@ -15,6 +15,10 @@ Here is a history of user visible changes to Mailman. - Plain text message bodies with Content-Disposition: and no declared charset are no longer scrubbed. (LP: #1917968) + - CommandRunner now recodes message bodies in the charset of the user's + or list's language to avoid a possible UnicodeError when including the + message body in the reply. (LP: #1921682) + 2.1.34 (26-Jun-2020) i18n |