From 9f3dcf617c4b4b79a6d7b16668627f79f0636aab Mon Sep 17 00:00:00 2001
From: Mark Sapiro <mark@msapiro.net>
Date: Thu, 12 Feb 2009 18:38:01 -0800
Subject: Worked around a potential problem in HyperArch.py with unicode
 character set arguments.  Bug #328353.

---
 Mailman/Archiver/HyperArch.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'Mailman/Archiver')

diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py
index ad51596e..a532c81e 100644
--- a/Mailman/Archiver/HyperArch.py
+++ b/Mailman/Archiver/HyperArch.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -302,6 +302,9 @@ class Article(pipermail.Article):
         self.decoded = {}
         cset = Utils.GetCharSet(mlist.preferred_language)
         cset_out = Charset(cset).output_charset or cset
+        if isinstance(cset_out, unicode):
+            # email 3.0.1 (python 2.4) doesn't like unicode
+            cset_out = cset_out.encode('us-ascii')
         charset = message.get_content_charset(cset_out)
         if charset:
             charset = charset.lower().strip()
-- 
cgit v1.2.3