summaryrefslogtreecommitdiff
path: root/src/mailman/handlers/cook_headers.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/handlers/cook_headers.py')
-rw-r--r--src/mailman/handlers/cook_headers.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/mailman/handlers/cook_headers.py b/src/mailman/handlers/cook_headers.py
index c7bb118aa..c3beb362e 100644
--- a/src/mailman/handlers/cook_headers.py
+++ b/src/mailman/handlers/cook_headers.py
@@ -17,7 +17,6 @@
"""Cook a message's headers."""
-import re
import logging
from email.header import Header
@@ -34,7 +33,6 @@ log = logging.getLogger('mailman.error')
COMMASPACE = ', '
MAXLINELEN = 78
-NONASCII = re.compile('[^\s!-~]')
@public
@@ -49,13 +47,6 @@ def uheader(mlist, s, header_name=None, continuation_ws='\t', maxlinelen=None):
If the header contains a newline, truncate it (see GL#273).
"""
charset = mlist.preferred_language.charset
- 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'
if '\n' in s:
s = '{} [...]'.format(s.split('\n')[0])
log.warning('Header {} contains a newline, truncating it.'.format(