diff options
| author | bwarsaw | 2002-10-20 14:48:14 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-10-20 14:48:14 +0000 |
| commit | 4dd915d724b6c38e69af0b3b6fa786eb1623cf58 (patch) | |
| tree | bf3f4032e789da3eb5fea62053e010c0c569d9a9 | |
| parent | 60a40fbaeb4db6d686e930401962ce2ed3a61363 (diff) | |
| download | mailman-4dd915d724b6c38e69af0b3b6fa786eb1623cf58.tar.gz mailman-4dd915d724b6c38e69af0b3b6fa786eb1623cf58.tar.zst mailman-4dd915d724b6c38e69af0b3b6fa786eb1623cf58.zip | |
prefix_subject(): The charsets coming from headerbits can be strings
in some cases; coerce them to Charset instances.
| -rw-r--r-- | Mailman/Handlers/CookHeaders.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index a8f910770..d3599e68d 100644 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -228,6 +228,8 @@ def prefix_subject(mlist, msg, msgdata): # Once again, convert the string to unicode. if c is None: c = Charset('iso-8859-1') + if not isinstance(c, Charset): + c = Charset(c) if not _isunicode(s): codec = c.input_codec or 'ascii' s = unicode(s, codec, 'replace') |
