I have an email source in a text file. I use kmail --view <file name w/absolute path> to open it in a composer. Even "Content-Type" header specifies UTF-8 charset, kmail composer is unable to cope with encoding, showing ugly characters instead of the right ones. Reproducible: Always Steps to Reproduce: 1. Download attached sample-email file 2. kmail --view $(pwd)/sample-email Actual Results: Non-ascii characters, like 'á' are not shown properly Expected Results: Non-ascii characters, like 'á' are shown properly Debian unstable with kdepim and kdepimlibs from experimental. Plasma-desktop from KF5 Versions: kdepim 4.14.5 kdepimlibs 4.14.6 kdelibs 4.14.2 qt4 4.8.7 qt5 5.4.2 kf5 5.12.0
Created attachment 93796 [details] Sample email with utf-8 text body
Created attachment 93797 [details] Sample email with iso-8859-1 text body (Content-Type UTF-8)
Created attachment 93798 [details] Sample email with iso-8859-1 text body (No Content-Type specified)
Interestingly enough, I have the following results using "kmail --view" with these attached files: - Sample email with iso-8859-1 text body (Content-Type UTF-8): Shown correctly, even Content-Type is wrongly specified as charset=UTF-8 - Sample email with iso-8859-1 text body (No Content-Type specified): Shown incorrectly. I have tested Kmail preferences -> composer -> charset with default "us-ascii" as first option and prioritizing utf-8 (either as system locale or forced) with no differences in behaviour. Also when opening email file, I have tested changing encoding in view->set encoding. Default is auto, but trying utf-8 works for any of the iso-8859-1 encoded files. For utf-8 email, choosing utf-8 encoding in the view menu does not work and any other worsen things. Doing kmail --view would be a typical use case when I want to send a git format-patch generated file. I have experience this wrong behaviour since a long time ago. Only that I hadn't reported it. Also, I used to convert files to iso-8859-1 to sort out the issue.
I have the same problem, and found a workaround for it: http://baohaojun.github.io/blog/2016/02/17/0-kmail---view-cant-display-some-maildir-files-correctly.html
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.