Bug 251513

Summary: HTML preview ignores charset
Product: [Applications] kmail Reporter: Christopher Yeleighton <giecrilj>
Component: messageviewerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: minor    
Priority: NOR    
Version: 1.13.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Christopher Yeleighton 2010-09-16 23:22:12 UTC
Version:           1.13.5 (using KDE 4.4.4) 
OS:                Linux

KMail shows code preview instead of HTML preview for HTML mails.

Reproducible: Always

Steps to Reproduce:
1. 
iconv >'/tmp/msg.mht' -f utf8 -t latin2 <<'<!-- EOF -->' && kmail --view '/tmp/msg.mht'
Subject: HTML preview ignores charset
MIME-Version: 1.0
Content-Type: TEXT/HTML; charset=ISO-8859-2

<!DOCTYPE HTML "-//W3C//DTD HTML 4.01//EN" 
><HTML LANG=pl 
><META 
HTTP-EQUIV=CONTENT-TYPE 
CONTENT="TEXT/HTML; CHARSET=ISO-8859-2" 
><TITLE >Ten dokument żle wygląda w podglądzie kodu</TITLE 
><P >Zażółć gęślą jaźń <!>
<!-- EOF -->


Actual Results:  
1. KMail displays the message window with the following warning:

Uwaga: To jest wiadomość HTML. Ze względów bezpieczeństwa wyświetlany jest tylko czysty kod HTML. Jeżeli ufasz nadawcy wiadomości, możesz obejrzeć sformatowaną wiadomość, klikając tutaj.


 <!DOCTYPE HTML "-//W3C//DTD HTML 4.01//EN" 
><HTML LANG=pl 
><META 
HTTP-EQUIV=CONTENT-TYPE 
CONTENT="TEXT/HTML; CHARSET=ISO-8859-2" 
><TITLE >Ten dokument ¿le wygl±da w podgl±dzie kodu</TITLE 
><P >Za¿ó³æ gê¶l± ja¼ñ <!>


Expected Results:  
1. The same, but with the HTML code properly decoded:

Uwaga: To jest wiadomość HTML. Ze względów bezpieczeństwa wyświetlany jest tylko czysty kod HTML. Jeżeli ufasz nadawcy wiadomości, możesz obejrzeć sformatowaną wiadomość, klikając tutaj.


 <!DOCTYPE HTML "-//W3C//DTD HTML 4.01//EN" 
><HTML LANG=pl 
><META 
HTTP-EQUIV=CONTENT-TYPE 
CONTENT="TEXT/HTML; CHARSET=ISO-8859-2" 
><TITLE >Ten dokument żle wygląda w podglądzie kodu</TITLE 
><P >Zażółć gęślą jaźń <!>


OS: Linux (x86_64) release 2.6.34-12-desktop
Compiler: gcc
Comment 1 Laurent Montel 2015-04-12 10:05:24 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.