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

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



 On Saturday, July 23, 2005 at 10:28:37 AM +0800, bxuefeng wrote:

> On 14:34 Fri 22 Jul     , Alain Bench wrote:
>>|     w3m -T text/html -I %{charset} -dump %s
> all mail with [meta gb2312] encoding is rendered by w3m like this:
>|-- Autoview using w3m -T text/html -I 'us-ascii' -dump '/tmp/mutt.html'
> Why it didn't recognize the meta tag?

    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?


    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.


Bye!    Alain.
-- 
set honor_followup_to=yes in muttrc is the default value, and makes your
list replies go where the original author wanted them to go: Only to the
list, or with a private copy.