ccdd61
diff -ruN mailman-2.1.12-a/Mailman/Archiver/pipermail.py mailman-2.1.12-b/Mailman/Archiver/pipermail.py
ccdd61
--- mailman-2.1.12-a/Mailman/Archiver/pipermail.py	2009-02-23 22:23:35.000000000 +0100
ccdd61
+++ mailman-2.1.12-b/Mailman/Archiver/pipermail.py	2009-07-28 12:19:53.000000000 +0200
ccdd61
@@ -45,24 +45,27 @@
ccdd61
 
ccdd61
 def fixAuthor(author):
ccdd61
     "Canonicalize a name into Last, First format"
ccdd61
-    # If there's a comma, guess that it's already in "Last, First" format
ccdd61
-    if ',' in author:
ccdd61
+    try:
ccdd61
+        # If there's a comma, guess that it's already in "Last, First" format
ccdd61
+        if ',' in author:
ccdd61
+            return author
ccdd61
+        L = author.split()
ccdd61
+        i = len(L) - 1
ccdd61
+        if i == 0:
ccdd61
+            return author # The string's one word--forget it
ccdd61
+        if author.upper() == author or author.lower() == author:
ccdd61
+            # Damn, the name is all upper- or lower-case.
ccdd61
+            while i > 0 and L[i-1].lower() in smallNameParts:
ccdd61
+                i = i - 1
ccdd61
+        else:
ccdd61
+            # Mixed case; assume that small parts of the last name will be
ccdd61
+            # in lowercase, and check them against the list.
ccdd61
+            while i>0 and (L[i-1][0] in lowercase or
ccdd61
+                           L[i-1].lower() in smallNameParts):
ccdd61
+                i = i - 1
ccdd61
+        author = SPACE.join(L[-1:] + L[i:-1]) + ', ' + SPACE.join(L[:i])
ccdd61
+    except UnicodeDecodeError:
ccdd61
         return author
ccdd61
-    L = author.split()
ccdd61
-    i = len(L) - 1
ccdd61
-    if i == 0:
ccdd61
-        return author # The string's one word--forget it
ccdd61
-    if author.upper() == author or author.lower() == author:
ccdd61
-        # Damn, the name is all upper- or lower-case.
ccdd61
-        while i > 0 and L[i-1].lower() in smallNameParts:
ccdd61
-            i = i - 1
ccdd61
-    else:
ccdd61
-        # Mixed case; assume that small parts of the last name will be
ccdd61
-        # in lowercase, and check them against the list.
ccdd61
-        while i>0 and (L[i-1][0] in lowercase or
ccdd61
-                       L[i-1].lower() in smallNameParts):
ccdd61
-            i = i - 1
ccdd61
-    author = SPACE.join(L[-1:] + L[i:-1]) + ', ' + SPACE.join(L[:i])
ccdd61
     return author
ccdd61
 
ccdd61
 # Abstract class for databases