[Mailman-Developers] checkdbs

Barry A. Warsaw barry@python.org
Fri Oct 25 20:04:20 2002


>>>>> "fil" ==   <fil@rezo.net> writes:

    fil> CVS from two days ago... maybe I'm still bugged down by my
    fil> bad practice of cvs, but?  ('French' is my server's default
    fil> language)

Ok, I'm about to check in a fix for this.  I think there may be a
better (more general) patch than what I'm going to commit, but I'm
afraid of repercussions, so I'm going with a local-to-checkdbs patch.

The problem happens when you have encoded names in the From field.
These get converted to Unicode in the requests.pck file, which would
return a Unicode from pending_requests().

But if maketext returns a byte string with non-ASCII characters in
them, you get this exception when trying to concatenate the two
strings together.  Once I fixed that, I noticed that if you then
change the list's language back to English, you'll get a different
exception because the notification's payload text contains Unicode
characters that don't match the list's charset.

So I'm changing checkdbs so that we make sure the payload is always a
byte string in charset of the list's language (with bad characters
replaced with '?').

The better fix might be for maketext() to always return a Unicode and
for us to use Unicode everywhere, but that's a Big Change.  Let's see
if we can worm around this for now.

-Barry