<<< Date Index >>>     <<< Thread Index >>>

Re: w3m can't show html mail with charset: gb2312



On Wed, Jul 20, 2005 at 06:30:28PM +0800, bxuefeng wrote:
> On 15:20 Wed 20 Jul     , Haizi Zheng wrote:
> > This one told mutt and many other mail client softwares that the subject
> > is gb18030 encoded, so they now know how to display them.
> > 
> > But if the subject is plain, mutt has no idea about what coding system 
> > should
> > be applied on, so it will use the default setting.
> 
> Now the issue is: how can we tell mutt or force mutt to display in the
> encodings we set?
> 

In your muttrc file you let all the non-unicode charset to be gb2312, but this
is only suitable for the body (when there's no charset=... in the header), not
for the subject, and the fields such as the From:, To, Cc,... the charset-hook
only take effect on the body.

If misfortunely the subject is plain and mutt has no knowledge about the coding
system, it will turn to your locale settings as default, here in your case, it
used utf-8.

So there may be only two ways if you wanna see the plain text messages:
1. change your locale to gb18030 (but this is really ugly and deprecated)
2. press `e' to call your editor, many editors are more powerful to do this job.

Maybe there are some ways to indicate a default charset for the subject, similar
to the `charset-hook' command? If it does exist, this must be perfect!  
;)

> > Here's a summary: 
> > 
> > 1. The subject line is plain by mistake, so mutt doesn't know which coding
> > system should be applied on it.
> 
> How to make it know which encoding to use by default? Because we can't force
> those stupid (perhaps lazy) mail server admins to change it.
> 
> > 2. The body is gb2312 encoded, which may be different from that applied on 
> > the
> > subject. Since the subject is plain, so it becomes really hard to display 
> > them
> > simutaneously.
> 
> Agree. If the body is in html format, then the task belongs to w3m which as I
> mentioned in previous messages can be solved by adding -I paramater. 
> 
> Now, for Subject and plain body, it is mutt's task to display them correctly.
> The problem is how to set them?
> 
> In my muttrc, I set: 
> 
> charset-hook .* gb2312
> charset-hook !utf-8 gb2312
> 
> but with no avail. 
> 
> 
> Any idea how to do it?
> 
> 
> bxuef
>