On 8/8/20 1:40 PM, Johannes Rohr wrote: > Am 08.08.20 um 21:44 schrieb Mark Sapiro: >> On 8/8/20 6:47 AM, Johannes Rohr wrote: >>> Dear all, >>> >>> As a quick fix I have now recoded the mailman.po for de to from latin1 >>> to utf8 and re-compiled it with msgfmt. This seems to fix things. BTW, I >>> stumbled across a problem with the mo file, that I had to fix first. >> What was the problem with the .mo? Is something wrong in the distribution? > > Line 7111, the msgid ends in > > " " > > whereas the msgstr ends in > > "</ul>\n" > > That is: It misses the last line which only consists of blanks.
I don't understand why this needed to be "fixed". The line of blanks is just whitespace and is not rendered in the HTML anyway and msgfmt (at least my "(GNU gettext-tools) 0.19.8.1" version) doesn't complain. >> Note that Debian's (and Ubuntu's) Mailman 2.1 package at one time[1] >> recoded templates and message catalogs to UTF-8 > > Right now, some are, some are not. Yes, as noted below in the latest 1:2.1.29-1 package, they've removed that patch. >> This was OK as far as it went, but they didn't consider the issue of >> strings in list attributes > > What's that? Excuse my ignorance. There are various list attributes that have string values which are encoded in the "old" charset. These strings may contain bytes which aren't valid utf-8 encodings so if you change the charset to utf-8, this causes problems. The thread at <https://mail.python.org/archives/list/mailman-users@python.org/thread/JDLVQY3EUEN2W4VIC4XVMO2HOT53NMZ5/> discusses one manifestation. The Debian package recoded the Finnish messages catalog and templates as utf-8 and declared the charset for Finish to be utf-8. The problem in this case is the list's description contained non-ascii characters encoded as iso-8859-1 which threw an exception when it was decoded as utf-8. >> being encoded in the old charset. This caused>> serious issues for some >> sites. See >> <https://mail.python.org/archives/list/mailman-users@python.org/thread/JDLVQY3EUEN2W4VIC4XVMO2HOT53NMZ5/#NTXJUVDV7SUWSLAPJ7AQTZTXGJGJW6DR> >> for one thread on this. > Thanks for the pointer! >> >> [1] They appear to have removed >> <https://sources.debian.org/patches/mailman/1:2.1.18-2/91_utf8.patch/> >> from the latest packages. It was in their 1:2.1.23-1 package, but is not >> in the 1:2.1.29-1 package. >> > Ah, interesting. However, what is the canonical approach then? Is the > mailman web interface supposed to recode everything to UTF on the fly? > Because, firefox thinks, that the pages are in UTF-8, presumably because > that's what the server says. Mailman includes the tag <META http-equiv="Content-Type" content="text/html; charset=xxx"> where xxx is Mailman's charset for the language. The browser shouls accept that. The problem is if you change Mailman's charset for the language to utf-8 but don't recode templates, messages and list attributes as utf-8, you will include non-utf-8 encodings in text declared as utf-8. > Strangely, after I recompiled de in UTF-8, German umlauts would display > correctly, but Russian, which has been in UTF-8 all along is suddenly > messed up. And here, it is not the message strings that are messed up > but it is the contents of listinfo.html that is in some 8 bit Russian > charset. How does that happen? Apparently I can't just delete a > subdirectory in /etc/mailman, because even after running > dpkg-reconfigure mailman and selecting the languages that I want, the > directory is created, but it is empty. How can I manually regenerate the > languages? I'm not sure what the problem is with Russian. It hasn't been utf-8 all along. Before 2.1.19, it was koi8-r. See <https://bazaar.launchpad.net/~mailman-coders/mailman/2.1/view/head:/NEWS#L955>. As it says there, > - 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) Is that your issue? I'm guessing you have a list specific Russian listinfo template that's still koi8-r encoded. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-le...@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/