Bug 550725 - mutt converts html attachments to uft-8 but leaves the original charset
Summary: mutt converts html attachments to uft-8 but leaves the original charset
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: mutt
Version: 19
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: jpacner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-27 03:25 UTC by Michal Jaegermann
Modified: 2014-08-31 23:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-23 12:22:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
a sample message with an attachment using charset="windows-1251" (48.20 KB, text/plain)
2009-12-27 03:25 UTC, Michal Jaegermann
no flags Details
a content of attachment as used by mutt when <view-mailcap> was employed (33.03 KB, text/html)
2009-12-27 03:33 UTC, Michal Jaegermann
no flags Details
what mutt shows with auto_view on the same message (20.88 KB, text/html)
2009-12-27 03:36 UTC, Michal Jaegermann
no flags Details
sample of mail which does not declare charset in html attachments (5.16 KB, text/plain)
2010-01-06 01:53 UTC, Michal Jaegermann
no flags Details
Patch backported from mutt-1.5.22 by Jakub Cajka (1.63 KB, patch)
2014-01-10 09:33 UTC, Honza Horak
no flags Details | Diff

Description Michal Jaegermann 2009-12-27 03:25:31 UTC
Created attachment 380487 [details]
a sample message with an attachment using charset="windows-1251"

Description of problem:

When trying to view an html attachment using <view-mailcap> function, bound to "m" key by default, mutt decodes a text of such attachment to UTF-8 but leaves "charset" as declared in the original headers.  Feeding that to some web browser may have rather "interesting" effects.

Curiously enough when using auto_view for text/html mutt is not doing a translation to UTF-8 and then what comes out look ok.

Attached is a sample message.  This is a pure spam but it is written in cyrillic using originally windows-1251 charset.

Version-Release number of selected component (if applicable):
mutt-1.5.20-1.20090827hg605559.fc12

How reproducible:
always like described although what is visible depends on the original charset

Expected results:
With an output converted, and only then, a charset declaration adjusted accordingly.  Most likely the easiest would be to drop it entirely to make it implicit.  This is encoded as "quoted-printable" so it has to be fed to mutt before it will start to make any sense at all.


Additional info:

A note in ChangeLog which says "Always display text/* parts inline" could use a rather more prominent warning.  Then one would not have to wonder why after an upgrade mutt starts to dump a raw html into display buffers while relevant entries in /usr/share/mutt/mailcap do exist and mutt was not behaving like that until now.  Figuring out that an explicit 'auto_view text/html' is now required is not immediate.

Comment 1 Michal Jaegermann 2009-12-27 03:33:02 UTC
Created attachment 380489 [details]
a content of attachment as used by mutt when <view-mailcap> was employed

Web browser makes a complete hash out of this.  If you will replace

    content="text/html; charset=windows-1251"

with 

    content="text/html"

then it will immediately start making sense.

Comment 2 Michal Jaegermann 2009-12-27 03:36:59 UTC
Created attachment 380491 [details]
what mutt shows with auto_view on the same message

This is saved just before 'unlink (tempfile);' at handler.c:1683 of mutt sources

Comment 3 Michal Jaegermann 2010-01-06 01:53:45 UTC
Created attachment 381898 [details]
sample of mail which does not declare charset in html attachments

To make matter more interesting attached is an example of mail (some spam again) where html headers do not exist.  Then a text converted to utf-8, when <view-mailcap> is in use, looks ok as this charset is assumed.  OTOH with auto_view a conversion is not done and it appears that a declared "iso-8859-1" is not taken into account.  It appears that then mutt simply drops from a display charactes which "do not fit".  This is not as drastic as in the previous example but "décédé" or "été" displayed as "d c d " or " t " is not doing very much to enhance readability.

Just to be sure: in /usr/share/mutt/mailcap I have

text/html; w3m -T text/html -I utf-8 %s
text/html; w3m -T text/html %s ; copiousoutput

to be able to deal with this one way or another.

Comment 4 Bug Zapper 2010-11-04 02:26:35 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Michal Jaegermann 2010-11-04 06:23:32 UTC
mutt-1.5.21-1.fc13 on Fedora 13 makes exactly the same mess as described.
A spam message was used for a sample but the same thing will happen with no spam as well.

Comment 6 Fedora Admin XMLRPC Client 2011-02-25 11:01:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Bug Zapper 2011-06-02 17:02:16 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Michal Jaegermann 2011-06-02 19:10:47 UTC
Nothing changed.  This is still broken.  Recently I got some mail in iso-8859-2 encoding.  What mutt displayed was rather unreadable with many characters replaced by blanks even in a text/plain variant of a message.  OTOH saving text in files resulted in a properly converted text displaying just fine in utf-8.

Comment 9 Fedora End Of Life 2012-08-16 18:16:14 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Michal Jaegermann 2012-08-16 18:59:40 UTC
(In reply to comment #9)
> Often a 
> more recent Fedora release includes newer upstream software that fixes 
> bugs or makes them obsolete.

It is trivial to check that mutt-1.5.21-12.fc17 and mutt-1.5.21-7.fc16 are affected by the same issue as described. Fedora 18 is using the same mutt-1.5.21
so there is no reason to thin that this may be fixed there.

Comment 11 Fedora Admin XMLRPC Client 2013-08-21 12:04:31 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 12 Fedora End Of Life 2013-12-21 14:52:23 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 jpacner 2013-12-23 12:22:40 UTC
Seems to be fixed in mutt 1.5.22.

Comment 14 Honza Horak 2014-01-10 09:33:41 UTC
Created attachment 848113 [details]
Patch backported from mutt-1.5.22 by Jakub Cajka


Note You need to log in before you can comment on or make changes to this bug.