Mutt + Broken HTML emails.
Submitted by msameer on Sat, 22/07/2006 - 4:39pm.
I always had a problem with Arabic HTML emails. They don't specify the encoding.
I'm using mutt (Yes!) as my mail reader. HTML emails can be handled using lynx and a mailcap entry like this:
text/html; /usr/bin/lynx -dump '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html The problem is that the HTML fragment in the email doesnt specify the encoding (or whatever the reason is). lynx always assumed an incorrect encoding (iso/cp1252 or whatever). I have no problem reading such emails by viewing the plain text part but It breaks when I reply to people.
The solution is to simply force lynx to use utf8
text/html; /usr/bin/lynx -assume_charset=utf8 -dump '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html Happy mutting!











Interesting - i always thought that most email clients included a mail header stating that the email is encoded using UTF-8.
Is this an auto-generated email? As in something from a listserv or an arabic website?
Al-Basha
I discovered later that the header is there but lynx gets an HTML fragment which doesn't specify a header.
Hi Mohammad, just wondering, when you say reading email you mean in console? or in a terminal like xterm? or mlterm, since it supports Arabic??
I'm using mutt and mlterm under Debian.