[Mailman-Users] charset problems when subscribing with python script

Bernd schlaber at gmx.at
Sun Feb 22 22:08:57 CET 2009


I doesn't have access to the add_members script and so I am writing a
python script which uses http requests to subscribe new members.

But if I am posting a new member with an name, which includes "German
Umlaute" I see only weird characters in the admin-interface.

If I post "Bärbel Rüssel" the admin-interface shows me the following
name: "Bärbel Rüssel"
I am using the German language setting, so I use ISO-8559-1 charset. If
I switch my browser to UTF-8 the name is correct in the admin-interface.

The strange thing for me is, that the name is correct if I subscribe the
member in the admin-interface manually. I don't know what's the
different between my python script and the manuell subscription. 

To Post to my mailman-server I use this recipe
(http://code.activestate.com/recipes/146306/) to generate the
multipart/form-data POST

I looked into the Mailman source code and found the Util.canonstr
method. At the end it changes the string to an unicode string. So the
name is stored as unicode, isn't it? But why is there a difference if I
display the manuell inserted name and the automatic inserted name??

~ Bernd

More information about the Mailman-Users mailing list