[Mailman-Developers] I18n proposal

Mikhail Zabaluev mhz@alt-linux.org
Wed, 21 Nov 2001 10:07:33 +0300

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


I'd like to see some I18n issues in Mailman to be addressed prior to
the 2.1 release. Basically, it's some bugs or misfeatures related to
transformation of MIME-encoded messages.

The most serious bug I see here is that messages encoded in base64
still get decorated with plaintext. This results in garbage on many
clients. Here I attach a quick fix to disable decoration for
base64-encoded messages. A more mature solution would be to decode
such messages into 8bit, implementing Decoder for that matter, and
slap decoration text onto the result. No, wait -- there still is an
implicit assumption that message bodies and the decoration text share
the same character set. Thus the decorations should be recoded from
what character set they are assumed to be in (ASCII? ISO8859-1? UTF-8?
Selectable per list?) into the character set of the message.

Another problem is encoded messages in archives. Heck, look at
this list's archive to see what I'm talking about. Those should also
be decoded and have character set converted to some uniform one. I'd
suggest UTF-8, but many browsers and text viewers still don't grok
this charset, so it'd better be selectable as well.

Stay tuned,
  MhZ                                     JID: mookid@jabber.org
A committee is a group that keeps the minutes and loses hours.
		-- Milton Berle

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mailman-decorate.patch"

--- mailman-cvs/Mailman/Handlers/Decorate.py.orig	Wed Nov 21 09:27:45 2001
+++ mailman-cvs/Mailman/Handlers/Decorate.py	Wed Nov 21 09:31:44 2001
@@ -52,10 +52,12 @@
     header = decorate(mlist, mlist.msg_header, _('non-digest header'), d)
     footer = decorate(mlist, mlist.msg_footer, _('non-digest footer'), d)
     # Be MIME smart here.  We only attach the header and footer by
-    # concatenation when the message is a non-multipart of type text/plain.
+    # concatenation when the message is a non-multipart of type text/plain
+    # in a human-readable encoding (i.e. not base64).
     # Otherwise, if it is not a multipart, we make it a multipart, and then we
     # add the header and footer as text/plain parts.
-    if not msg.is_multipart() and msg.get_type('text/plain') == 'text/plain':
+    if not msg.is_multipart() and msg.get_type('text/plain') == 'text/plain'
+       and msg['Content-Transfer-Encoding'] != 'base64':
         payload = header + msg.get_payload() + footer
     elif msg.get_type() == 'multipart/mixed':