Bug 127658

Summary: KMail sometimes chooses the wrong Content-Type iso-8859-6
Product: [Applications] kmail Reporter: Malte S. Stretz <mss>
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: christophe, tmp
Priority: NOR    
Version: 1.9.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: A sample message which triggers the wrong Content-Type
The reply created by KMail with the wrong Content-Type

Description Malte S. Stretz 2006-05-19 15:38:04 UTC
Version:           1.9.1 (using KDE 3.5.2, Gentoo)
Compiler:          gcc version 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)
OS:                Linux (i686) release 2.6.16-gentoo-r1

This is actually the same as bug 112537, I'll mark that one as a duplicate of this because the bug is actually more general.

The problem is, that KMail sometimes marks messages with the Content-Type iso-8859-6 (and only that one it seems) even though my settings look like this:
  pref-charsets=locale,iso-8859-1,iso-8859-15,utf-8
  force-reply-charset=false

Most the time this happens when I reply to multipart messages (not iso-8859-6 in the main part) or ones without any Content-Type at all.  But I've got at least one example where KMail created a fresh (English) mail with that charset.  It's reproducable:  Just hitting reply and saving the message as a draft will write the wrong Content-Type.  I'll attach an example.

Judging from my archives, this started to happen after I upgraded to KMail 1.8 in early 2005.
Comment 1 Malte S. Stretz 2006-05-19 15:42:38 UTC
*** Bug 112537 has been marked as a duplicate of this bug. ***
Comment 2 Malte S. Stretz 2006-05-19 15:44:46 UTC
Created attachment 16174 [details]
A sample message which triggers the wrong Content-Type
Comment 3 Malte S. Stretz 2006-05-19 15:46:06 UTC
Created attachment 16175 [details]
The reply created by KMail with the wrong Content-Type
Comment 4 Ingo Klöcker 2006-05-19 18:23:41 UTC
Hmm, I saved the message from comment #2, opened it in KMail (File->Open), hit reply and saved as draft. The Content-Type of the draft is iso-8859-15. My charsets are: us-ascii, iso-8859-15 (locale), utf-8. After changing my charsets to match your setting it still works correctly.

Which locale are you using?

Please check whether you can reproduce it with a new user.
Comment 5 Malte S. Stretz 2006-05-19 18:53:54 UTC
My locale is iso-8869-1.

I created a fresh user and with that one I can't reproduce it.  I tried to set my own charset settings to the default list but KMail still assigns the wrong charset.
Comment 6 Ingo Klöcker 2006-05-19 21:02:19 UTC
Please check whether you can reproduce it with a new user but with your kmailrc and emailidentities files.
Comment 7 Brian Wallis 2006-06-16 04:36:15 UTC
I had this problem as well but have fixed it now.

It appeared on the 21st November last year (determined from my sent email folder) but I didn't notice until today when someone complained about not being able to read my email correctly (windows wanted to install a language pack first). I keep a very up-to-date Gentoo system and checked the emerge log but couldn't find that anything significant was installed at around that time. I was running kde 3.4.1 at the time (now 3.5.3)

I found that I had the following setting in my kmailrc file:

FallbackCharacterEncoding=iso-8859-6

This is also found in the kmail settings window under the "Message Window" tab. I set it back to iso-8859-1 and now everything works OK.
Comment 8 Malte S. Stretz 2006-06-16 09:14:51 UTC
Yes, you're right.  I had that setting, too.  No idea why it was set to that locale... wait got one idea:  "Arabic" is the one which is alphabetically the first in the list.  So probably I once visited that tab, had nothing set and it just took the first entry as the default.  But I've definitley got no idea why it choses that "Appearance" setting more or less randomly when I'm composing mails (where I've got a working locale selected)...
Comment 9 Christophe Marin 2008-04-09 16:59:36 UTC
Confirmed in trunk (KDEPIM rev. 795179).

The only difference with Comment #7 is the value :

FallbackCharacterEncoding=ISO 8859-6 (instead of iso-8859-6)

Comment 10 Christophe Marin 2008-04-21 12:28:13 UTC
The issue seems to be resolved now in trunk (r. 799297) 
Comment 11 Thomas McGuire 2008-04-21 14:46:49 UTC
> The issue seems to be resolved now in trunk (r. 799297) 
OK, closing the report then.