Re: Index text weirdness

2002-10-15 Thread Alain Bench

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



Re: Index text weirdness

2002-09-17 Thread Alain Bench

Hello Michael and Ken,

 On Monday, September 16, 2002 at 10:42:52 PM +0200, Michael Tatge wrote:

 Ken Weingold ([EMAIL PROTECTED]) muttered:
 Why is it that someone's name with a tilde 'a' in it comes out like
 the following in the index, but in the pager it's fine?
 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, and there is no email address. With a stock 1.4 both
in index and pager it appears as-is, undecoded. With the
decode_2047_invalid patch, it appears as you describe: decoded in pager,
but not in index... Perhaps because there is no address there?

I don't believe there is a Mutt side solution.


 Try setting rfc2047_parameters.

That's for attachment filenames.


Bye!Alain.
-- 
Microsoft Outlook Express users concerned about readability: For much
better viewing quotes in your messages, check the little freeware
program OE-QuoteFix by Dominik Jain on URL:http://flash.to/oblivion/.
It'll change your life. :-) Now exists also for Outlook.



Re: Index text weirdness

2002-09-17 Thread Ken Weingold

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, and there is no email address. With a stock 1.4 both
 in index and pager it appears as-is, undecoded. With the
 decode_2047_invalid patch, it appears as you describe: decoded in pager,
 but not in index... Perhaps because there is no address there?
 
 I don't believe there is a Mutt side solution.

Oh, there was a real address, I just didn't paste it in. ;)  I hate to
say it, but it was Outlook doing it.  It's the tilde-a, though.  The
guy took it out and the name came out no problem.



-Ken