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

Mark Sapiro mark at msapiro.net
Mon Feb 23 18:58:21 CET 2009


Bernd wrote:
>
>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.


It appears that what may be happening is due to a character set
mismatch somewhere. It looks like when "Bärbel Rüssel" is converted to
unicode it is actually encoded as utf-8 but is converted as if it were
iso-8859-1 encoded.


>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. 


I suspect the post data from your script is utf-8 encoded and not
iso-8859-1 encoded.

-- 
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