aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Queue/CommandRunner.py
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2021-10-15 05:39:36 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2021-10-15 05:39:36 +0900
commitd4a18da3a7dda34718f7043409f2dbc28a6e97c4 (patch)
tree0b6ce2aa91377c21584f836e650609d427e57ed6 /Mailman/Queue/CommandRunner.py
parent393892351c22b83e54b95965d17ae346e5fad989 (diff)
parent6cc831d90d9e22091c05f49e54502d188f7f0712 (diff)
downloadmailman2-d4a18da3a7dda34718f7043409f2dbc28a6e97c4.tar.gz
mailman2-d4a18da3a7dda34718f7043409f2dbc28a6e97c4.tar.xz
mailman2-d4a18da3a7dda34718f7043409f2dbc28a6e97c4.zip
sync merge lp:mailman/2.1 up to 1871
Diffstat (limited to '')
-rw-r--r--Mailman/Queue/CommandRunner.py5
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()