Re: mutt/2560: Mutt chokes on invalid charset in UTF environment
The following reply was made to PR mutt/2560; it has been noted by GNATS.
From: Alain Bench <veronatif@xxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc:
Subject: Re: mutt/2560: Mutt chokes on invalid charset in UTF environment
Date: Fri, 8 Dec 2006 20:20:41 +0100 (CET)
On Thursday, December 7, 2006 at 8:05:02 +0100, Christian Ebert wrote:
> * Vincent Lefevre on Wednesday, November 22, 2006 at 14:25:02 +0100:
>> But if the freeze occurs in libiconv, Mutt can't do anything.
> Hm. I still think it would be better if would gave a warning than to
> just freeze.
Printing a warning each time Mutt encounters an unknown label? That
might well quickly become annoying, no? And Mutt learns if a charset is
known by calling iconv_open(). If this call happens to freeze...
> I stumbled accross another evil [gb2312failure.gz] example ;-): my old
> iconv has no trouble with attached message, whereas Mutt freezes
This one has in its "From:" header 2 bytes invalid in GB2312. Mutt
should mask them, printing 2 question marks. And does so under Linux, no
freeze. Do you have any way to determine where exactly the freeze
happens? Strace, gdb, whatever?
BTW the said 2 bytes are (I guess) perhaps really GB18030, a
superset of GB2312. The probably best move is to alias them with:
| charset-hook ^gb2312$ gb18030
This should avoid you the freeze, and optimally display this mail
and others of the same type (understatement in MIME label). See full
story in Debian wishlist Bug#402027: "Display of GB2312 should be
treated as GB18030 by default".
And of course much thanks for reporting bugs, Christian! :-)
Bye! Alain.
--
Followups to bug reports are public, and should go to bug-any@xxxxxxxxxxxxx,
and the reporter (unless he is a member of mutt-dev). Do not CC mutt-dev
mailing
list, the BTS does it already. Do not send to mutt-dev only, your writings
would
not be tracked. Do not remove the "mutt/nnnn:" tag from subject.