Bug 451518 - Use no or UTF-8 as default when non-ASCII characters are encountered in header
Summary: Use no or UTF-8 as default when non-ASCII characters are encountered in header
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: 5.16.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-15 08:23 UTC by Erik Quaeghebeur
Modified: 2022-03-15 08:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
mail with UTF-8 character in ASCII header (246 bytes, application/mbox)
2022-03-15 08:23 UTC, Erik Quaeghebeur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Quaeghebeur 2022-03-15 08:23:37 UTC
Created attachment 147503 [details]
mail with UTF-8 character in ASCII header

SUMMARY
When a mail with some non-ASCII characters is encountered with the encoding of the header being (effectively) ASCII, KMail tries to decode it assuming ISO-8859-1. Because currently such occurrences tend to actually be UTF-8, this results in failed decodings in general. (I assume it was different in the past, when ISO-8859-1 was the most common ASCII-extension encoding used.) Obviously, the mail is malformed, because of the missing encoding information. So the strict thing to do is to show explicitly that the character(s) cannot be decoded, e.g., using the replacement character �. The lenient thing to do, nowadays, is to assume UTF-8.

STEPS TO REPRODUCE
1. List folder with mail with non-encoded non-ISO-8895-1-character in header

OBSERVED RESULT
Observe that character is decoded as if it were ISO-8859-1

EXPECTED RESULT
Observe that character is decoded as replacement character � or as if it were UTF-8.

SOFTWARE/OS VERSIONS
KMail: 5.18.3
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2 (with https://community.kde.org/Qt5PatchCollection)