[Kde-pim] Character encoding handling in KMail/KMime

Andras Mantia amantia at kde.org
Mon Nov 28 09:22:30 GMT 2011


Hi,

 on the weekend I fixed a problem introduced with the HTML reply branch, 
where the characters in the reply were wrongly encoded. While trying to get 
around the code and see where do the strings get broken I realized that it 
is just insane what we do there with the character encodings. The messages 
are encoded, decoded often (and now I refer both to charset encoding and 
string encoding for transfer), while the message does not leave KMail (or 
its libraries, like composer, templateparser) code. This also includes of 
course a lot of QString->QByteArray and QByteArray->QString covnersion.
 In my opinion there should be exactly two conversion: when the message is 
read into KMime and when it is written out from KMime (either to disc, send 
through the network or someway else). For all the rest it should be just 
unicode in a QString.
 Of course this is an intrusive change and KDE 5 (or whatever comes next 
material). What do you think of it? Does it even makes sense to go in this 
direction? Any better ideas?

Andras

 
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list