[Mailman-Users] Mailman 2.1.13 and Unicode
Mark Sapiro
mark at msapiro.net
Mon Jul 5 16:45:06 CEST 2010
Ulf Dunkel wrote:
>I wonder if there is any simple way to have my Mailman 2.1.13 strings
>set to Unicode (UTF-8).
For English language lists, it should be as simple as putting
add_language('en', 'English (USA)', 'utf-8', 'ltr')
in mm_cfg.py. This has not been done in the distribution for
superstitious reasons. Note that the i18n call _('English (USA)')
that's in Defaults.py has been intentionally omitted above. You don't
want it in the mm_cfg.py context.
For another language which is not already utf-8, e.g. German, in
addition to putting
add_language('de', 'German', 'utf-8', 'ltr')
in mm_cfg.py, you also need to transliterate the message catalog and
templates to from iso-8859-1 to utf-8. I.e. you need to do something
like
#!/bin/sh
cd $prefix
temp=mktemp
for file in `ls templates/de` ; do
iconv -f iso-8859-1 -t utf-8 -o $temp templates/de/$file
cp $temp templates/de/$file
done
cd messages/de/LC_MESSAGES
iconv -f iso-8859-1 -t utf-8 mailman.po | \
sed '/^"Content-Type:/s/charset=.*\\n/charset=utf-8\\n/ > $temp
cp $temp mailman.po
msgfmt -o mailman.mo mailman.po
--
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