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