Bug 360850

Summary: broken characters encoding on replying multipart emails
Product: [Applications] kdepim Reporter: Vadim A. Misbakh-Soloviov (mva) <kde>
Component: messagecomposerAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal    
Priority: NOR    
Version: 5.21.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Vadim A. Misbakh-Soloviov (mva) 2016-03-22 13:17:04 UTC
Hi!
I've noticed that when I replying on emails in some cases I see original email's quote in right encoding, and sometimes non-ascii characters are broken.

So, after some digging I've discovered that if I answer on email with
> Content-Type: text/plain; charset="<charset>"
in headers (i.e. non-multipart), then quote text in messagecomposer window is fine.

But if original email has something like
> Content-Type: multipart/alternative; boundary=<...>
or
> Content-Type: multipart/mixed; boundary="<...>"
in the source, then text in message composer looks like
```
РпиÑÑме Ð¾Ñ Ð¿Ð¾Ð½ÐµÐ´ÐµÐ»Ñник, 21 маÑÑа 2016 г. 12:41:33 NOVT полÑзоваÑÐµÐ»Ñ Alex Domoradov напиÑал:
> ÐÑло Ð±Ñ ÐºÑÑÑо, еÑли Ð±Ñ Ð¼Ð¾Ð¶Ð½Ð¾ бÑло покÑпаÑÑ Ð¾ÑделÑнÑе модÑли, а не веÑÑ
```
(i.e. even messagecomposer's text meaning "On <date> you wrote" is broken).

Reproducible: Always

Steps to Reproduce:
1. receive multipart message with non-ascii text
2. click "reply"


Actual Results:  
non-ascii text is broken

Expected Results:  
all text in right encoding
Comment 1 Vadim A. Misbakh-Soloviov (mva) 2016-03-23 09:30:13 UTC
by the way, as second mbox attachment in bug #360851 shows, messageviewer, when called in separate viewer window, is affected by that bug too.
Comment 2 Vadim A. Misbakh-Soloviov (mva) 2016-03-23 09:39:03 UTC
By the way. I'm just found, that "Keep original charset when replying or forwarding (if possible)" checkbox changes that behaviour (bug appears when it checked and disappears when unchecked)
Comment 3 Vadim A. Misbakh-Soloviov (mva) 2016-03-23 09:41:25 UTC
although, it (predictably) doesn't change that bug behaviour in messageviewer.
Comment 4 Vadim A. Misbakh-Soloviov (mva) 2017-02-11 10:31:43 UTC
Ping?
Comment 5 Justin Zobel 2022-10-30 00:37:19 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 6 Vadim A. Misbakh-Soloviov (mva) 2022-11-12 20:42:34 UTC
Yes I do.
Just checked with Kontact 5.21.2