Bug 287581 - encoding messed up in reply
Summary: encoding messed up in reply
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: Git (master)
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-25 23:04 UTC by Milian Wolff
Modified: 2011-11-27 01:13 UTC (History)
0 users

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 Milian Wolff 2011-11-25 23:04:14 UTC
Version:           Git (master)
OS:                Linux

I got an email which contains the word "geklärt" among others. When I reply to it, the quoted text has this word with messed up encoding: "gekl�rt" 

Reproducible: Always

Steps to Reproduce:
reply to message with special chars

Actual Results:  
�

Expected Results:  
ä
Comment 1 Milian Wolff 2011-11-25 23:04:46 UTC
btw: personally, I think this is a huge issue and should be fixed asap. if someone could point me in the right direction I could maybe help.
Comment 2 Torgny Nyblom 2011-11-26 06:36:41 UTC
What do you have under Settings->Composer->Charsets?

(I cannot reproduce here and I have us-acsii, iso-8859-1, utf-8)
Comment 3 Milian Wolff 2011-11-26 11:31:21 UTC
I have:

us-ascii
iso-8859-1
utf-8 (locale)
utf-8

Note that this error doesn't seem to happen everywhere, i.e. not for all emails I reply to. But I have one for which it is always reproducible. It contains confidential data, otherwise I'd gladly forward it to you.

So, could you maybe give me some pointers on where to look? And what to look out for?
Comment 4 András Manţia 2011-11-27 01:13:53 UTC
Git commit 61386be0f7d5dba3e85150115a44b2ecb7647879 by Andras Mantia.
Committed on 27/11/2011 at 02:13.
Pushed by amantia into branch 'master'.

First set the charset, then set the body, so the body is encoded correctly into the charset.
Use 8bit for the transfer encoding.
This fixes a double unicode encoding problem on reply, as without the above the body might be encoded into unicode and later another toUnicode is performed on it when the reply charset is applied.
BUG: 287581

M  +3    -4    templateparser/templateparser.cpp

http://commits.kde.org/kdepim/61386be0f7d5dba3e85150115a44b2ecb7647879