23683d
=== modified file 'Mailman/Queue/CommandRunner.py'
23683d
--- Mailman/Queue/CommandRunner.py	2018-06-17 23:47:34 +0000
23683d
+++ Mailman/Queue/CommandRunner.py	2021-03-31 21:53:20 +0000
23683d
@@ -100,6 +100,11 @@
23683d
             # E.g the outer Content-Type: was text/html
23683d
             return
23683d
         body = part.get_payload(decode=True)
23683d
+        if (part.get_content_charset(None)):
23683d
+            body = unicode(body, part.get_content_charset(),
23683d
+                           errors='replace').encode(
23683d
+                           Utils.GetCharSet(self.msgdata['lang']),
23683d
+                           errors='replace')
23683d
         # text/plain parts better have string payloads
23683d
         assert isinstance(body, StringType) or isinstance(body, UnicodeType)
23683d
         lines = body.splitlines()
23683d