diff options
Diffstat (limited to 'Mailman/Queue/CommandRunner.py')
-rw-r--r-- | Mailman/Queue/CommandRunner.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index 6ea50255..3c21065f 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -100,6 +100,11 @@ 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(), + errors='replace').encode( + Utils.GetCharSet(self.msgdata['lang']), + errors='replace') # text/plain parts better have string payloads assert isinstance(body, StringType) or isinstance(body, UnicodeType) lines = body.splitlines() |