On 6/25/17 2:15 AM, Sergey Maslennikov wrote:
We tried to upgrade Mailman from v. 2.1.9 to v. 2.1.20 (default for Ubuntu 16.04) and discovered that for Russian language, mailman scripts tuned the browsers to receive UTF-8 encoded text. How can we turn mailman back to KOI8-R?
There are multiple things going on here. In Mailman 2.1.19, the character set for Russian (and Romanian) was changed to UTF-8. This was described in the NEWS for 2.1.19 as follows:
- Mailman's character set for Russian has been changed from koi8-r to utf-8 and the templates and messages recoded. This change will require running 'bin/arch --wipe' on any existing Russian language lists in order to recode the list's archives, and will require recoding any edited templates in lists/LISTNAME/ru/*, templates/DOMAIN/ru/* and templates/site/ru/*. It may also require recoding any existing koi8-r text in list attributes. (LP: #1418448)
- Mailman's versions.py has been augmented to help with the above two character set changes. The first time a list with preferred_language of Romanian or Russian is accessed or upon upgrade to this release, any list attributes which have string values such as description, info, welcome_msg, etc. that appear to be in the old character set will be converted to utf-8. This is done recursively for the values (but not the keys) of dictionary attributes and the elements of list and tuple attributes.
Independently, Debian (upon which Ubuntu is based) responded to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398777 with https://sources.debian.net/patches/mailman/1:2.1.18-2%2Bdeb8u1/91_utf8.patch... which forces all languages to UTF-8 encoding and because it neglects to do the list attribute string recoding, caused other issues. See https://mail.python.org/pipermail/mailman-users/2016-January/080278.html and https://bugs.launchpad.net/mailman/+bug/1462755. Probably the least disruptive way for you to reverse this is the following: 1) add this line to mm_cfg.py LC_DESCRIPTIONS['ru'] = ('Russian', 'koi8-r', 'ltr') You can't use add_language here because the Debian patch redefines that to force utf-8. 2) recode messages/ru/LC_MESSAGES/mailman.po with `iconv f=utf-8 t=koi8-r' and run 'msgfmt -o messages/ru/LC_MESSAGES/mailman.mo messages/ru/LC_MESSAGES/mailman.po' to recompile the message catalog. 3) recode all the templates in templates/ru -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan