[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RMAIL doesn't always recognize rmail-mime-charset-pattern

From: Eli Zaretskii
Subject: Re: RMAIL doesn't always recognize rmail-mime-charset-pattern
Date: Sun, 19 May 2002 20:31:28 +0300

[I'm taking this to emacs-devel, since I think we need to discuss the issue.]

> From: David Kuehling <address@hidden>
> Date: 19 May 2002 17:24:25 +0200
> I had a closer look on how emacs pop3 mail retrieval works.  It uses the
> movemail program for copying the remote mailbox into a local temporary
> file and then gets mail from that file as it would do with a local
> inbox.  So I used the movemail program for manually moving the mail.
> The resulting file, mailbox-popretrieved (attached), shows a few small
> differences from the orignal mailbox.  There are some additional lines
> and flags added to the mails.
> That mail, read using C-u g mailbox-popretrieved <Ret>, now triggers the
> bug, ie EUC-JP is not correctly decoded.  Is this due to the minor
> differences?  Hopefully you can reproduce the bug (else it might already
> be fixed with your version... I'm running 21.1.1).

Yes, I can reproduce this now, and the problem is indeed the format
used by movemail to write the mailbox file: it's the Babyl format.
(That format is not unique to pop3 protocol, though.)

It is actually very simple: when rmail-convert-to-babyl-format sees a
mailbox in Babyl format, it decodes the messages using
decode-coding-region.  Needless to say, decode-coding-region does not
know anything about the special importance of the charset= header, so
it simply summons its usual guesswork trying to detect the encoding of
each message.  The result is that, with some messages, you will get
your default coding system as the message encoding; I'm guessing that
Latin-1 is your default (my default is different, so I got a different

By contrast, when rmail-convert-to-babyl-format sees an mbox format,
it honors the charset= headers, so the result is correct.

Handa-san, can you tell why does the Babyl branch of
rmail-convert-to-babyl-format use decode-coding-region without ever
looking at the charset= header?  It sounds like a bug, since movemail
uses that format.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]