Re: w3m can't show html mail with charset: gb2312
<Please accept my apology if this message is already posted. I got some
glitches with my MTA and I thought I didn't send this one>
On 15:48 Sat 23 Jul , Alain Bench wrote:
> Mutt doesn't look at meta tags *inside* the attachment, but at the
> MIME packaging *around* it:
>
> | Content-Type: text/html; charset=whatever
>
> Then Mutt calls w3m with "-I whatever". So probably all mails you
> checked had as container either "charset=us-ascii" or lacking charset
> parameter (implicit US-Ascii).
>
> That also means that for w3m, -I overrides meta charset, right? This
> might be bad. Can w3m be configured to use -I only if meta lacks? Does
> w3m use meta at all?
I am not sure of this meta tag stuff. Is meta embedded in html pages, if the
answer is yes, then it can of course use meta.
>
>
> Try mailcap entries revision 2.0:
>
> | text/html ;\
> | w3m -T text/html -I GB2312 -dump %s ;\
> | nametemplate=%s.html ;\
> | test=test %{charset} = us-ascii ;\
> | copiousoutput
> | text/html ;\
> | w3m -T text/html -I %{charset} -dump %s ;\
> | nametemplate=%s.html ;\
> | copiousoutput
>
> This should provide a reasonable default GB2312, and permit all
> other charsets. Still overrides meta in every case, though.
>
Thank you. I pasted them in my mailcap and so far it works like charm.
Could you explain a bit on these entries?
|test=test %{charset} = us-ascii ;\
What's this 'test' for? To test what? Why it equals us-ascii?
does %{charset} mean that mutt will parse html page's charset and them send
it to w3m?
| nametemplate=%s.html ;\
what does this line for?
Message's body and Subject can now display correct encodings.
Regarding Subject encoding, I use
|unset strict_mime
|set assumed_charset="gb2312"
in muttrc on debian/sarge as you suggested and it works great.
Still another question:
the part in From: remains unaffected. How to set encoding for From: as well?
regards
bxuef
--
dhammapada says:
The perfume of tagara and sandalwood is of little enough power, while
the supreme fragrance, that of the virtuous, reaches even up to the
devas. 56