diff options
| author | Barry Warsaw | 2014-11-30 21:51:03 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-11-30 21:51:03 -0500 |
| commit | 44e43727be13e3554342c2b5b75b7dc42abdb18c (patch) | |
| tree | a0b97771f5d0856709ac8ab48c1e8f9eeecef352 /src/mailman/handlers/cook_headers.py | |
| parent | 065060e56ac2445b6749b60480e9c42573854c5e (diff) | |
| download | mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.tar.gz mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.tar.zst mailman-44e43727be13e3554342c2b5b75b7dc42abdb18c.zip | |
Diffstat (limited to 'src/mailman/handlers/cook_headers.py')
| -rw-r--r-- | src/mailman/handlers/cook_headers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mailman/handlers/cook_headers.py b/src/mailman/handlers/cook_headers.py index d5d096448..5fdfc238b 100644 --- a/src/mailman/handlers/cook_headers.py +++ b/src/mailman/handlers/cook_headers.py @@ -201,7 +201,7 @@ def prefix_subject(mlist, msg, msgdata): # range. It is safe to use unicode string when manupilating header # contents with re module. It would be best to return unicode in # ch_oneline() but here is temporary solution. - subject = unicode(subject, cset) + subject = subject.decode(cset) # If the subject_prefix contains '%d', it is replaced with the # mailing list sequential number. Sequential number format allows # '%d' or '%05d' like pattern. @@ -270,7 +270,7 @@ def ch_oneline(headerstr): else: cset = 'utf-8' h = make_header(d) - ustr = unicode(h) + ustr = h.decode('utf-8') oneline = ''.join(ustr.splitlines()) return oneline.encode(cset, 'replace'), cset except (LookupError, UnicodeError, ValueError, HeaderParseError): |
