emacs-devel
[Top][All Lists]
Advanced

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

automatic MIME decoding in rmail


From: Evil Boris
Subject: automatic MIME decoding in rmail
Date: Thu, 23 Mar 2006 11:32:56 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

I have been caught several times by the following.  Email comes with
the content-type message header

---------
Content-Type: text/plain;
        format=flowed;
        charset="koi8-r";
        reply-type=original
---------

Notice that CHARSET specifier does not immediately follow
"text/plain"---there is a FORMAT specification intervening in between.
For example hotmail.com sends such messages and several other
services.  (I have not been able to determine from reading the spec if
this is allowed by the standard.  Not sure how relevant that is
though.)  Emacs does not decode the charset correctly correct, because
of the following:

(defvar rmail-mime-charset-pattern
  "^content-type:[ ]*text/plain;[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?"
  "Regexp to match MIME-charset specification in a header of message.
The first parenthesized expression should match the MIME-charset name.")

I guess the fix is to replace [ \t\n]* with a pattern matching any
number of intervening specifications.  Not sure what form they should
take, so will leave that for an expert.

Thank,
        --Boris





reply via email to

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