[Mailman-Developers] Mailman CVS sends out Japanese template mails in EUC-JP

Ben Gertzfield che@debian.org
Tue, 11 Sep 2001 11:57:56 +0900


More thoughts on the i18n mail issues.

Currently, this is the sequence of the default pipeline for the
Handlers.

GLOBAL_PIPELINE = [
    'SpamDetect',
    'Approve',
    'Replybot',
    'Hold',
    'Tagger',
    'CalcRecips',
    'Cleanse',
    'CookHeaders',
    'ToDigest',
    'ToArchive',
    'Personalize',
    'Decorate',
    'AfterDelivery',
    'Acknowledge',
    'ToUsenet',
    'ToOutgoing',
    ]

I'm not sure if we can add an "IncomingLang" at the beginning and an
"OutgoingLang" at the end that just deal with conversion to an
archivable format, then to a mailable format at the end, but that'd
be the best thing to do. 

The problem is, for Japanese, we need to convert the mails to EUC-JP
before they go to SpamDetect/Approve/Hold/etc., or else they won't
even be readable in the admin's web interface!

But if they're converted to EUC-JP before the ToDigest step, will there
be any chance to convert them back to ISO-2022-JP when the digest is
sent out?  How do we deal with this on a per-message basis, if not
all the mails are in EUC-JP?

I tried to grok to code in ToDigest.py, which seems mostly
internationalized, but it doesn't seem to do anything but add the
payload of each message to the digest:

    for msg in messages:
        # MIME
        mimedigest.add_payload(msg)
        # rfc1153
        if first:
            first = 0
        else:
            print >> plainmsg, separator30
            print >> plainmsg
        g = Generator(plainmsg)
        g.write(msg, unixfrom=0)
    # Now add the footer

Will msg here always be a Message object?  If so, it shouldn't be too
hard to run it through the appropriate {lang}/Outgoing.py language
converter manually before we add it to the mimedigest.

Ben

-- 
Brought to you by the letters M and O and the number 2.
"A squib is a firecracker."
Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.debian.org/