Re: w3m can't show html mail with charset: gb2312
On 2005-07-21, Alain Bench <messtic@xxxxxxxxx> wrote:
> On Wednesday, July 20, 2005 at 3:20:43 PM +0800, Haizi Zheng wrote:
> >>| Content-Type: text/html; charset=GB2312
> >>| Content-Transfer-Encoding: base64
>
> By principle Mutt gives to the external renderer the html attachment
> after de-MIMEing, base64 decoding, but whithout any charset transcoding.
> It is the the duty of the external renderer to convert text to display,
> be it in it's own window, or even given back to Mutt's autoview.
>
> The problem is when html doesn't contain meta tags telling its
> charset, when the only indication is the MIME container. Mutt doesn't
> pass this info to the external viewer. Perhaps it should.
I think it already does, or can. In the mutt manual, section
5.3.3.3 Command Expansion, it says:
%{<parameter>}
Mutt will expand this to the value of the specified parameter
from the Content-Type: line of the mail message. For instance,
if Your mail message contains:
Content-Type: text/plain; charset=iso-8859-1
then Mutt will expand %{charset} to iso-8859-1. The default
metamail mailcap file uses this feature to test the charset
to spawn an xterm using the right charset to view the
message.
Note: I have never used any of this charset stuff myself; I only
remembered seeing something about it in the manual.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA