[Mailman-Users] utf-8 error with all lists

Mark Sapiro mark at msapiro.net
Mon May 13 11:19:41 EDT 2019


On 5/13/19 7:46 AM, Jason Morrill wrote:
> 
> Now that I have my Python-fu working I'm retesting Mark's suggestion:
> 
> webserv:~# python
> Python 2.7.13 (default, Sep 26 2018, 18:42:22)
> [GCC 6.3.0 20170516] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import string
>>>> string.lowercase
> 'abcdefghijklmnopqrstuvwxyz'
>>>>
> 
> It appears that lowercase does return an apparent properly lowercased string of letters. So, I'm uncertain why the hand-edited code would function differently.


This is what we were unable to solve in the original thread starting at
<https://mail.python.org/pipermail/mailman-users/2019-March/084241.html>
for 10 posts and then continuing at
<https://mail.python.org/pipermail/mailman-users/2019-March/084266.html>
for another 13 posts.

When the OP put in the logging suggested at
<https://mail.python.org/pipermail/mailman-users/2019-March/084273.html>, we
discovered that in this Mailman/Archiver/pipermail.py at least, string
.lowercase returns the iso-8859-1 encoding of
'abcdefghijklmnopqrstuvwxyzµßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ' (see
<https://mail.python.org/pipermail/mailman-users/2019-March/084280.html>),
but we were never able to determine where this came from.

If you are curious, you could modify your current
/var/lib/mailman/Mailman/Archiver/pipermail.py which i think will contain

lowercase = 'abcdefghijklmnopqrstuvwxyz' at line 13.

If you add following that, the two lines

import string
syslog('error', 'string: %r', string)

You should then see (after at least one post) messages in Mailman's
error log like

<timestamp> string: <module 'string' from ...

where ... is the location of the Python string module. This will
probable be a .pyc file, but you can look in the corresponding .py file
for the definition of lowercase. in my /usr/lib/python2.7/string.py, it is

lowercase = 'abcdefghijklmnopqrstuvwxyz'

There is also

ascii_lowercase = lowercase

I'm curious as to what these are in yours.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the Mailman-Users mailing list