From 025094bf9692e3f2ae58321bb753425a01046163 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 7 Jun 2015 22:41:05 -0700 Subject: Fixed an issue with shunted messages on a list where the charset for the list's preferred_language had been changed from iso-8859-1 to utf-8 without recoding the list's description. --- Mailman/Handlers/CookHeaders.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Mailman') diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index 236f39f1..25fda890 100755 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -65,7 +65,12 @@ def uheader(mlist, s, header_name=None, continuation_ws='\t', maxlinelen=None): else: # there is no nonascii so ... charset = 'us-ascii' - return Header(s, charset, maxlinelen, header_name, continuation_ws) + try: + return Header(s, charset, maxlinelen, header_name, continuation_ws) + except UnicodeError: + syslog('error', 'list: %s: can\'t decode "%s" as %s', + mlist.internal_name(), s, charset) + return Header('', charset, maxlinelen, header_name, continuation_ws) def change_header(name, value, mlist, msg, msgdata, delete=True, repl=True): if ((msgdata.get('from_is_list') == 2 or -- cgit v1.2.3