Some findings to share... On Tuesday, September 17, 2002 at 4:50:14 PM -0400, Ken Weingold wrote:
> On Tue, Sep 17, 2002, Alain Bench wrote: >>>> From: "=?iso-8859-1?Q?Jo=E3o_T. _da_Costa?=" >> What mailer generated this header? It's broken: there is a space in >> the encoded word > it was Outlook doing it. I guess what you quoted was not the original header: The real one had no space, and no double quotes around, right? It probably was like this in original mail: | From: =?iso-8859-1?Q?Jo=E3o_T._da_Costa?= <something> > It's the tilde-a, though. No, it's the unquoted and unencoded dot. It's illegal in this sort of encoded word (names). Mutt reacts strangely by adding a space just after the dot. Then it tries to decode the encoded word, but fails because of the illegal space. It stays displayed in index like that: | =?iso-8859-1?Q?Jo=E3o_T. _da_Costa?= When you reply, Mutt sees only US-Ascii, and because of the dot encloses the string in double quotes, like this: | To: "=?iso-8859-1?Q?Jo=E3o_T. _da_Costa?=" <something> We're now at what you copy/pasted. >> With the decode_2047_invalid patch, it appears as [...] It appears correctly decoded. Just with a space too much in index. So this patch can be a workaround: It comes attached. Remains 2 questions: - Why does Mutt add a space there for display in index. - Why doesn't it add a space for display in pager. I want to thank Jacek Nowosielski from comp.mail.mutt who gave me complete and accurate info about this case. Bye! Alain.
diff -dur mutt-1.4/rfc2047.c mutt-1.4.mod/rfc2047.c --- mutt-1.4/rfc2047.c Sat Apr 20 09:25:49 2002 +++ mutt-1.4.mod/rfc2047.c Mon Jun 10 19:01:55 2002 @@ -705,7 +707,7 @@ ; if (q[0] != '?' || !strchr ("BbQq", q[1]) || q[2] != '?') continue; - for (q = q + 3; 0x20 < *q && *q < 0x7f && *q != '?'; q++) + for (q = q + 3; 0x20 <= *q && *q < 0x7f && *q != '?'; q++) ; if (q[0] != '?' || q[1] != '=') { --- PATCHES Tue Nov 6 19:59:33 2001 +++ PATCHES Tue Nov 6 19:59:42 2001 @@ -1,0 +1 @@ +patch-1.4.ab.decode_2047_invalid.1