Bug 445264 - Decode decrypted message with wrong character encoding method
Summary: Decode decrypted message with wrong character encoding method
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: crypto (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-10 09:54 UTC by Yao Nianqing
Modified: 2021-11-10 09:54 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 Yao Nianqing 2021-11-10 09:54:08 UTC
When KMail received an encrypted mail, it will use GnuPG to decrypt it,and GnuPG will send decrypted data back in UTF-8 (As long as that is text message), so KMail should display those data in UTF-8, too. But sometimes, while there's a header line that indicates charset, for example, `Content-Type: text/plain; charset="gb2312"`, KMail will display the decrypted data in that charset, not UTF-8. So that message will be unreadable.

STEPS TO REPRODUCE
1. Received an encrypted mail which indicates its non-UTF-8 charset. 
   You can send a email with inline GPG meaasge from a Chinese Win10 machine with built-in mail client of Win10 to make this. Or you can send a mail to yourself and move it to local maildir, then modify its header.
2. Decrypt it in KMail.

OBSERVED RESULT
Unreadable characters will display as decrypted message.

EXPECTED RESULT
Decode it properly.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20211105
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
GnuPG: 2.2.27
libgcrypt: 1.9.4