[#8858] Mime part charset for html attachment
Summary Mime part charset for html attachment
Queue IMP
Queue Version Git master
Type Enhancement
State Resolved
Priority 1. Low
Owners Michael Slusarz <slusarz (at) horde (dot) org>
Requester patrick (dot) guiran (at) linagora (dot) com
Created 02/09/10 (35 days ago)
Due
Updated 02/10/10 (34 days ago)
Assigned
Resolved 02/09/10 (35 days ago)
Attachments horde-webmail-1.2.4-lng2_patch-html-attachment.patch Download
test.html Download
kmail__without_patch.png Download
kmail__with_patch.png Download
thunderbird__without_patch.png Download
thunderbird__with_patch.png Download
Milestone 5.0
Patch Yes

History
02/10/10 CVS Commit Comment #9 Reply to this comment
02/09/10 Michael Slusarz Comment #8
Assigned to Michael Slusarz
State ⇒ Resolved
Version ⇒ Git master
Milestone ⇒ 5.0
Reply to this comment
Among other issues, your fix is not backwards compatible and we should 
be using mime magic to determine the charset, not hardcoded regex 
strings.  For these reasons, this will not be fixed in Horde 3.x.   
However, this has been fixed for Horde 4.0/IMP 5.0.
02/09/10 CVS Commit Comment #7 Reply to this comment
02/09/10 patrick (dot) guiran (at) linagora (dot) com Comment #6
New Attachment: thunderbird__with_patch.png Download
Reply to this comment
Thunderbird : test result *with* the patch
02/09/10 patrick (dot) guiran (at) linagora (dot) com Comment #5
New Attachment: thunderbird__without_patch.png Download
Reply to this comment
Thunderbird : test result without the patch
02/09/10 patrick (dot) guiran (at) linagora (dot) com Comment #4
New Attachment: kmail__with_patch.png Download
Reply to this comment
Kmail : test result *with* the patch
02/09/10 patrick (dot) guiran (at) linagora (dot) com Comment #3
New Attachment: kmail__without_patch.png Download
Reply to this comment
Kmail : test result without the patch
02/09/10 patrick (dot) guiran (at) linagora (dot) com Comment #2
New Attachment: test.html Download
Reply to this comment
test file with french words (iso-8859-1)
02/09/10 patrick (dot) guiran (at) linagora (dot) com Comment #1
State ⇒ New
New Attachment: horde-webmail-1.2.4-lng2_patch-html-attachment.patch Download
Patch ⇒ 1
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Mime part charset for html attachment
Type ⇒ Enhancement
Priority ⇒ 1. Low
Reply to this comment
When a user sends a mail with an HTML file as attachment, the HTML 
file can't be displayed correctly on mail readers program, due to lack 
of charset information in the MIME Part.

/!\ note /!\ The attached file is a patch for horde-webmail 1.2.4. It 
has been deployed in production context since 2 months without problem
  * $Horde: imp/lib/Compose.php,v 1.107.2.86 2009/07/29 06:04:42 slusarz Exp $
  * $Horde: framework/MIME/MIME/Magic.php,v 1.52.8.18 2009/01/06 
15:23:20 jan Exp $


use case test :
1/ compose a new mail with horde
2/ attach a html file with a charset specified
3/ send the mail
4/ receive the mail on a mail client (thunderbird, kmail, ...)
5/ open the attachment file without save it on disk

To check the html file charset, I use the "file" commande on Linux :

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 9.10
Release:        9.10
Codename:       karmic

$ file --mime test.html
test.html: text/html; charset=iso-8859-1