Bug 97663

Summary: cyrillic (koi8-r) html+text / html messages are incorrectly generated
Product: [Applications] kmail Reporter: Roman Shiryaev <mih_val>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: antonio.merker
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: This is an mbox with broken message which was generated by recent version of kmail
The right message which was generated by Mozilla Thunderbird 1.0 (mbox file)

Description Roman Shiryaev 2005-01-22 18:19:47 UTC
Version:           cvs (20050122) (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

I'm using KOI8-R russian locale.

How to reproduce:
1. Generate one-line HTML+TEXT message (color, center your text etc.)
2. Send it yourself.
3. 
The first problem:
You will get ??? in text part. The reason is an incorrert header
Content-Type: text/plain;
  charset="koi8-r"
Content-Transfer-Encoding: 7bit

But should be something like
Content-Type: text/plain;
  charset="koi8-r"
Content-Transfer-Encoding: 8bit

And the second: html part is rendering by konqueror in wrong encoding (composer should specify an encoding of the body using something like
<meta http-equiv="Content-Type" content="text/html; charset=KOI8-R" />
But it doesn't do this job)
Comment 1 Roman Shiryaev 2005-01-22 18:23:34 UTC
Created attachment 9219 [details]
This is an mbox with broken message which was generated by recent version of kmail
Comment 2 Roman Shiryaev 2005-01-22 18:26:38 UTC
Created attachment 9220 [details]
The right message which was generated by Mozilla Thunderbird 1.0 (mbox file)
Comment 3 Jörg Hermsdorf 2006-03-05 20:07:50 UTC
I can confirm that html messages are not correctly generated with KDE 3.5.1.
If you enable "HTML-Formatting" in the message Composer AND if you actually apply some HTML-Formatting to you message, Kmail generates a multipart/alternative message. The html-part of your message is correctly encoded with UTF-8. But the text-only part of your message seems to be not encoded with UTF-8, so all non-ASCII characters are broken.

Can be easily reproduced:
1. create a new message
2. enable HTML-Formatting
3. write some words including non-ASCII letters
4. apply some HTML-Formatting
5. save your message to drafts
6. open your message in drafts folder

You'll see Kmail created a multipart/alternative message. The html-part is correctly encoded with utf-8 and all non-ASCII letters are correctly shown. But the text-only-part is probably not encoded with utf-8 because all non-ASCII letters are broken.
Comment 4 Thiago Macieira 2006-03-05 20:15:20 UTC
I can confirm this.

KMail is doubly encoding as UTF-8.
Comment 5 S Bufton 2006-04-02 19:10:37 UTC
I'm seeing a probably related problem in KMail 1.9.1, KDE 3.5.2. Writing a mail in German with HTML formatting (3 lines formatted as unordered list) messes up the character encoding. Non-ASCII characters (accented, such as ä,ö or ü) are encoded in the HTML according to normal mail encoding (ä -> =E4, ö -> =F6, ü -> =FC). In the initial compose window, and in the draft message display, the message appears OK. Editing the draft message, though, or sending it, results in a mangled display. Examples (I hope this works here):

möchte -> m=F6chte
für -> f=FCr
europäische -> europ=E4ische

Switching the display to text only ALSO displays the message wrongly.
Comment 6 Thomas McGuire 2007-04-29 19:16:50 UTC
Judging from comment #3, this seems to be the same problem as in bug 144779, therefore I'll mark this as a duplicate.

*** This bug has been marked as a duplicate of 144779 ***