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

[Mutt] #3415: HTML Rendering with elinks fails with different content encodings or mail and terminal



#3415: HTML Rendering with elinks fails with different content encodings or mail
and terminal
-----------------------------------+----------------------------------------
 Reporter:  sum                    |       Owner:  mutt-dev
     Type:  defect                 |      Status:  new     
 Priority:  major                  |   Milestone:          
Component:  mutt                   |     Version:  1.5.20  
 Keywords:  bug/feature, proposal  |  
-----------------------------------+----------------------------------------
 When using elinks to view html parts of emails, the following problem
 arises: mutt exports the part into the file using the terminal encoding
 (which seems to be fine for most text attachements, e.g. plain, tex, c
 source, ...) and calls elinks with the in .mailcap specified command. Now
 elinks reads the html file, finds a <meta http-equiv="Content-Type"...>
 header with charset="..." different from the terminal charset and tries to
 decode all the characters using that other charset given by the meta
 header. The output of elinks is then encoded using the terminal character
 set and read by mutt using the same character set. But unfortunately
 elinks interprets the characters in a wrong way since the encoding of the
 file is not equal to that in the meta header.

 To reproduce:

 .mailcap:
 text/html; elinks -dump -default-mime-type text/html %s; needsterminal;
 copiousoutput;

 Have a terminal using e.g. utf-8 and read a mail using iso-8859-15. No put
 a few special characters into that mail like ÃÃÃÃ and try to read it using
 elinks via mutt.

 To workarounds:
 1) Use sed to replace the charset= value of the meta header to the
 terminal character set, or
 2) Use iconv to convert the file output by mutt to the character set
 specified by charset= value of meta header, or
 3) Tell mutt to export text/html parts of emails using the character set
 given by the <meta> header actually this is difficult since mutt does not
 have a html parser.
 4) [which is best in my eyes] Let mutt export the file in the encoding
 given by the associated email header, as far as i can see, that is the
 same encoding as the <meta> header says.

 This problem happens to me with emails from e-bay.

 Best Regards and thanks for such a useful email client,
  Clemens

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3415>
Mutt <http://www.mutt.org/>
The Mutt mail user agent