On Thu, Sep 02, 2010 at 04:39:23PM -0400, Ed Blackman wrote:
I did a little searching and found that RFC 2047 is the technical specification for these encoded strings, and that mutt does have RFC 2047 support. However, none of the muttrc entries that mention it seem relevant to RFC 2047 decoding for the index and pager display of the Subject line.

There aren't any user configurable settings for RFC2047 support. It happens automatically according to the rules in the RFC.

Here are the relevant headers from an email that isn't displayed correctly:

Subject: 
=?US-ASCII?Q?Intrade_Gazette:_John_Thune_for_President?_Roger_Clemens_heads_to_court._Will_the_'Ground_Zero_Mosque'_get_built??=

The problem is that the sender's MUA has not produced a valid RFC2047 encoding. Here is the ABNF (RFC2047, section 2, "Syntax of encoded-words"):

   encoded-word = "=?" charset "?" encoding "?" encoded-text "?="

   charset = token    ; see section 3

   encoding = token   ; see section 4

   token = 1*<Any CHAR except SPACE, CTLs, and especials>

   especials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "
               <"> / "/" / "[" / "]" / "?" / "." / "="

   encoded-text = 1*<Any printable ASCII character other than "?"
                     or SPACE>
                  ; (but see "Use of encoded-words in message
                  ; headers", section 5)

encoded-text may not contain bare question marks (?), and your example includes two of them. Mutt has no way to parse this accurately, so it simply displays the full string.

It is also curious that this header is RFC2047 encoded at all, since there are no quoted-printable encodings anywhere in the string. There is no reason to encoded that string at all.

MIME-Version: 1.0
Content-Type: text/html;
        charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

I would expect to see "Intrade Gazette: "... in the index and pager, instead of "=?US-ASCII?Q?Intrade_Gazette:_"...

Thinking that it might be a charset issue, I tried "charset-hook US-ASCII ISO-8859-1", but that did not change the display.

me

Reply via email to