Bug 92925 - KMail should allow swithing encoding for reading individual messages
Summary: KMail should allow swithing encoding for reading individual messages
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: mime (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 19:03 UTC by Mikhail Ramendik
Modified: 2007-09-14 12:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Ramendik 2004-11-08 19:03:27 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    RedHat RPMs
Compiler:          gcc 3.2.2 
OS:                Linux

Sometimes messages arrive with wrongly set charset headers. This is not kmail's fault, of course.

Currently kmail allows seitching the encoding for viewing these messages, but one must switch back to Auto afterwards.

bug 84702 offers some fallback encoding. But this may not always work as bad messages arrive in different encodings (I regularly get them in two encodings, windows-1251 and koi-8r).

The pverride solution is the most straughtforward and simple one. But overriding should be available for an individual message, rarther than for reading all messages. In an ideal world, the override setting would be saved into the message (as i.e. X-Kmail-CharsetOverride), so that it's opened the right way afterwards - without affecting other messages.
Comment 1 Andreas Gungl 2004-11-08 20:54:05 UTC
On Montag 08 November 2004 19:03, Mikhail Ramendik wrote:
> Sometimes messages arrive with wrongly set charset headers. This is not
> kmail's fault, of course.

A proposal for the experienced users: you can create filters which add (or 
rewrite) certain charset headers. Add them to the filter action menu. You 
can also add an icon to make them visible in the toolbar. Then you're able 
to make permanent charset changes to the messages.

Comment 2 Ingo Klöcker 2005-05-16 16:02:58 UTC
I agree that we should always fall back to Auto when another message is selected. A permanent override character encoding can be specified in the configuration dialog.

I'm not sure about the X-KMail-CharsetOverride header because changing a message header is expensive over IMAP (download message, change header, upload message). IMO fixing/changing the charset should be solved via a script or a plugin once we support something like this.
Comment 3 Mikhail Ramendik 2005-05-16 16:14:00 UTC
Actually a filter can already do this; I wrote one for Cyrillic autodetection, in Python, using the enca autodetection library. My plugin is at http://www.ramendik.ru/fomenca/index.html , a link to enca is also there.
Comment 4 Mikhail Ramendik 2006-09-06 20:54:29 UTC
The feature is present in kmail in kde 3.5.2. Marking bug as resolved.
Comment 5 Oded Arbel 2006-12-04 17:56:40 UTC
Is this issue really resolved ? I noticed "Override encoding" in the kmail message viewer configuration dialog, but it doesn't do anything: I've set the override to Auto, and now if I try to view an e-mail with an incorrect character encoding, and it doesn't display right, and I choose a different encoding - then the new encoding still get stuck. When I then open a new message where the encoding is detected correctly (but is deferent then the encoding of the bad message), it is rendered incorrectly and I must go back to the character encoding list and choose "auto" again. 

I understood that this issue was about solving this problem so that I don't have to reset the character encoding manually after viewing one broken message.
Comment 6 David Lee 2007-01-31 09:53:17 UTC
I've encountered mail that could not be solved with the change-header-through-filter hack. The mail is a multipart/mixed message, where the body of the e-mail is encoded in EUC-KR, but the Content-Type for this body is set to ISO-8859-1. The problem is, Kmail cannot access the Content-Type header for the body because there is already a Content-Type for the multipart/mixed e-mail message. There seems to be no way to change the headers of included sections in a multipart message. Therefore, the only way to view the message in Korean is to actually go to View->Set Encoding.
As suggested in bug #94702, it would be convenient if we could have the ability to set the "View->Set Encoding" option for each individual message, and have it retained across sessions. This is actually a feature provided by the StickyCharset plugin for Thunderbird.