From 572b3840d506de51200948112544997317f37e0a Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Fri, 10 Jan 2003 20:30:58 +0000 Subject: Article.__init__(): Watch out for tuples coming back from message.get_param(). Such beasts are RFC 2231 charsets which need to be converted to unicode. --- Mailman/Archiver/HyperArch.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Mailman') diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index 98fb5738..de02da8a 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -258,6 +258,9 @@ class Article(pipermail.Article): self.cenc = cenc.lower() self.decoded = {} charset = message.get_param('charset') + if isinstance(charset, types.TupleType): + # An RFC 2231 charset + charset = unicode(charset[2], charset[0]) if charset: charset = charset.lower().strip() if charset[0]=='"' and charset[-1]=='"': -- cgit v1.2.3