Hi,
Le vendredi 26 avril 2013 à 18:18, d'après
"[email protected]" <[email protected]> :
> I have the following entry in the .
> mailcap file used by Mutt :
>
> text/html; /usr/bin/w3m -I %{charset} -dump -T text/html '%s';
> copiousoutput; description=HTML Text; nametemplate=%s.html
>
> which is incorrectly interpreted as
>
> /usr/bin/w3m -I 'iso-8859-1' -dump -T text/html ''/tmp/mutt.html''
>
> (as I can read from Mutt headers) instead of
>
> /usr/bin/w3m -I 'utf-8' - dump -T text/html ''/tmp/mutt.html''
>
> as it should be, according to the
>
> charset="utf-8"
>
> entry in my .muttrc. This of course causes some characters to be unreadable.
>
> Testing the charset variable in Mutt returns the correct value (utf-8).
This seems like perfectly expected behaviour if the mail you were viewing is
encoded in iso-8859-1. The charset="utf-8" is related to your locale, whereas
the %{charset} is related to the charset of the mail or attachment you are
viewing.
See "Command Expansion" in manual.txt:
[...]
%{<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.
[...]
Regards,
Tom
--
Thomas Parmelan
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]