[Mailman-Developers] checkdbs UnicodeError

Tokio Kikuchi tkikuchi at is.kochi-u.ac.jp
Thu Feb 6 19:25:41 EST 2003


Hi,

Try this patch. It's a coincidence that I am working on it.

Index: checkdbs
===================================================================
RCS file: /cvsroot/mailman/mailman/cron/checkdbs,v
retrieving revision 2.17
diff -u -r2.17 checkdbs
--- checkdbs    28 Oct 2002 03:43:42 -0000      2.17
+++ checkdbs    6 Feb 2003 10:21:27 -0000
@@ -92,6 +92,7 @@



 def pending_requests(mlist):
+    lcset = Utils.GetCharSet(mlist.preferred_language)
     # Must return a byte string
     pending = []
     first = 1
@@ -101,6 +102,8 @@
             first = 0
         when, addr, fullname, passwd, digest, lang = mlist.GetRecord(id)
         if fullname:
+            if _isunicode(fullname):
+                fullname = fullname.encode(lcset, 'replace')
             fullname = ' (%s)' % fullname
         pending.append('    %s%s %s' % (addr, fullname, time.ctime(when)))
     first = 1

=======

Daniel Buchmann wrote:
> I was the puzzled receiver of these words this morning:
> 
> Traceback (most recent call last):
>   File "/home/mailman/cron/checkdbs", line 136, in ?
>     main()
>   File "/home/mailman/cron/checkdbs", line 80, in main
>     text += '\n' + pending_requests(mlist)
>   File "/home/mailman/cron/checkdbs", line 123, in pending_requests
>     text = NL.join(pending)
> UnicodeError: ASCII decoding error: ordinal not in range(128)
> 
> 
> Anyone else seen this and know how to fix it?
> Couldn't find anything about this in the SF bug tracker...
> 
> I'm using the Release_2_1-maint CVS branch.
> 
> 
> -Daniel
> 

-- 
Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/




More information about the Mailman-Developers mailing list