Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] Charset/encoding for e-mail message

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Hatuka*nezumi - IKEDA Soji <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-dev] Charset/encoding for e-mail message
  • Date: Sun, 15 Oct 2006 10:01:01 +0900

Hi Sympa-dev,


By suggestions, I released new Perl modules: MIME::Charset and
MIME::EncWords (similarly to Peter's work, this is another
alternative for MIME::Words, but focuses on supporting multibyte
charsets):
http://search.cpan.org/perldoc/MIME%3A%3ACharset
http://search.cpan.org/perldoc/MIME%3A%3AEncWords

Reviced patch (attached) is based on these modules. Changes made
are ---

- encode_mimewords()/decode_mimewords() of MIME::Words are
repleaced by alternative ones of MIME::EncWords (but
modification is imcomplete, as described later).

o encode_mimewords() automatically chooses appropriate encoding
(B, Q or unencoded) by enhanced ``Encoding="A"'' option.

- src/mail.pm:reformat_message(): reformat outgoing service messages
(along with charset conversion for Japanese messages).

* To support charset conversion for Japanese messages, _charset_
of po/ja.po must be changed from UTF-8 to EUC-JP (how about
Rosetta stuff?).

- src/Message.pm:new(), src/List.pm:distribute_msg():
custom_subject processing was improved. It will handle
mixed-charset situations better.


Problem ---

In addtion to patch described above, I tried replacing
MIME::Words::decode_mimewords(STRING)
with
MIME::EncWords::decode_mimewords(STRING, Charset=>CHARSET).

But I cannot clarify what CHARSET may be used to feed decoded data
to TT2 templates. By any charset (including _UNICODE_), TT2 seems
to break fed data. See bug #1059.


Other known bugs ---

- When address headers of service messages include non-ASCII
characters, headers will be encoded maliciously.

It is advisable that structured headers (address fields,
parenthesized comments, parameters,...) will be handled
separately by some appropriate functions.

- Headers for some service messages (at least MIME-Version,
Content-Type and Content-Transfer-Encoding) are duplicated.
This doesn't seem to be caused by this patch.

*

BTW I got the Sympa T-shirt at Tuesday......It's Cool!!


--- nezumi

Attachment: sympa-MAIN-20061015-mail_encoding.patch
Description: Binary data




Archive powered by MHonArc 2.6.19+.

Top of Page