Improve previous fix: don't crash on non-latin1 chars.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Thu, 17 Mar 2011 21:43:22 +0000 (22:43 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Thu, 17 Mar 2011 21:43:22 +0000 (22:43 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
bin/lists.rpc.py

index 33017d0..0668daa 100755 (executable)
@@ -575,7 +575,7 @@ def handle_request(userdesc, perms, mlist, id, value, comment):
     # Mailman will use internally
     # LC_DESCRIPTIONS is a dict of lang => (name, charset, direction) tuples.
     encoding = mm_cfg.LC_DESCRIPTIONS['fr'][1]
-    comment = comment.encode(encoding)
+    comment = comment.encode(encoding, 'replace')
     mlist.HandleRequest(int(id), int(value), comment)
     return 1