aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Queue
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2021-03-30 12:32:42 -0700
committerMark Sapiro <mark@msapiro.net>2021-03-30 12:32:42 -0700
commite1f509efe72b433fdedea7ef24526b09934768d2 (patch)
tree44a8cb3179d23b378e11aae4321c79aaa54f1128 /Mailman/Queue
parent416d2e6ef003869486dcf6d212133511114767be (diff)
downloadmailman2-e1f509efe72b433fdedea7ef24526b09934768d2.tar.gz
mailman2-e1f509efe72b433fdedea7ef24526b09934768d2.tar.xz
mailman2-e1f509efe72b433fdedea7ef24526b09934768d2.zip
Decode message bodies for replies in CommandRunner.
Diffstat (limited to 'Mailman/Queue')
-rw-r--r--Mailman/Queue/CommandRunner.py3
1 files changed, 3 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()