
Kaja P. Christiansen wrote:
I have (so far) been unable to show correctly Danish characters in the names of the list members. Let me give 2 examples.
Say I create a list 'test' and subscribe a member like here: newlist -l da test kaja@cs.au.dk kaja echo "Kaja Jørgensen kaja@cs.au.dk" | add_members -r - -a n -w n test to which Mailman responds with: Tilmeldt: Kaja Jørgensen kaja@cs.au.dk
So far so good. Now I ask for the membership list with list_members -f test and receive back: Kaja J?rgensen kaja@cs.au.dk
The name 'Kaja Jørgensen' is stored internally as a python unicode object. list_members encodes this for display using the encoding given by Python's sys.getdefaultencoding(). This in turn defaults to "ascii". If you want list_members to show non-ascii characters as other than '?', you have two choices.
You can edit the definition of setencoding() in /usr/lib/pythonV.V/site.py to replace "ascii" with "iso-8859-1", or you can edit Mailman's bin/list_members and replace the line
ENC = sys.getdefaultencoding()
with
ENC = "iso-8859-1"
I edit the membership list from the web page:
- go to Membership List
- replace member name Kai Nielsen with Kai Jørgensen Nielsen (looks good)
- submit changes
- go to another web membership page, then back to one with 'Kai...' and see: Kai Jørgensen Birger Nielsen
Again, the name is properly stored internally. This display is due to over-protection of the web interface from cross-site-scripting attacks. The attached file escape_html.patch.txt contains a patch that will allow these names to display properly in the admin Membership List.