Apply 00_stolen_from_HEAD.patch
authorMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:32:49 +0000 (20:32 -0400)
committerMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:32:49 +0000 (20:32 -0400)
Mailman/Handlers/Scrubber.py

index 4a4a3c5..ddef51f 100644 (file)
@@ -370,6 +370,8 @@ Url : %(url)s
                     t = u.encode('ascii', 'replace')
                 try:
                     # Should use HTML-Escape, or try generalizing to UTF-8
+                    if len(charset) == 0:
+                        charset = 'us-ascii'
                     t = t.encode(charset, 'replace')
                 except (UnicodeError, LookupError, ValueError):
                     t = t.encode(lcset, 'replace')