Messages shunted when there are non-ASCII characters in list description
Unhandled UnicodeEncodeError exception while encoding Reply-To header, which uses list description.
File "/opt/mailman/venv-3.4/lib/python3.4/site-packages/mailman/core/runner.py", line 165, in _one_iteration
self._process_one_file(msg, msgdata)
File "/opt/mailman/venv-3.4/lib/python3.4/site-packages/mailman/core/runner.py", line 258, in _process_one_file
keepqueued = self._dispose(mlist, msg, msgdata)
File "/opt/mailman/venv-3.4/lib/python3.4/site-packages/mailman/runners/pipeline.py", line 41, in _dispose
process(mlist, msg, msgdata, pipeline)
File "/opt/mailman/venv-3.4/lib/python3.4/site-packages/mailman/core/pipelines.py", line 62, in process
handler.process(mlist, msg, msgdata)
File "/opt/mailman/venv-3.4/lib/python3.4/site-packages/mailman/handlers/cook_headers.py", line 170, in process
process(mlist, msg, msgdata)
File "/opt/mailman/venv-3.4/lib/python3.4/site-packages/mailman/handlers/cook_headers.py", line 127, in process
i18ndesc = uheader(mlist, mlist.description, 'Reply-To')
File "/opt/mailman/venv-3.4/lib/python3.4/site-packages/mailman/handlers/cook_headers.py", line 58, in uheader
return Header(s, charset, maxlinelen, header_name, continuation_ws)
File "/usr/lib64/python3.4/email/header.py", line 217, in __init__
self.append(s, charset, errors)
File "/usr/lib64/python3.4/email/header.py", line 304, in append
s.encode(output_charset, errors)
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 11-13: ordinal not in range(256)
Possible fix: in handlers/cook_headers.py, function uheader() change
if NONASCII.search(s):
# use list charset but ...
if charset == 'us-ascii':
charset = 'iso-8859-1'
else:
# there is no non-ascii so ...
charset = 'us-ascii'
to
if NONASCII.search(s):
# use list charset but ...
if charset == 'us-ascii':
charset = 'utf8'
else:
# there is no non-ascii so ...
charset = 'us-ascii'