Bug 445562 - long subject line in UTF-8 is decoded incorrectly
Summary: long subject line in UTF-8 is decoded incorrectly
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 5.14.2
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-16 00:37 UTC by Igor Zhuravlov
Modified: 2021-11-16 00:37 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 Igor Zhuravlov 2021-11-16 00:37:35 UTC
SUMMARY
***
When message's subject is:
1) in UTF-8,
2) encoded by Base64 as multi-line,
3) has a character which codepoint is splitted among lines,-
then this character is decoded incorrectly.
***

STEPS TO REPRODUCE
1. Receive a message with subject e.g.

Кассовый чек от ФГАОУВО "ДВФУ" за 16.11.2021

which is encoded as:

Subject: =?utf-8?B?0JrQsNGB0YHQvtCy0YvQuSDRh9C10Log0L7RgiDQpNCT0JDQ?=
 =?utf-8?B?ntCj0JLQniAi0JTQktCk0KMiINC30LAgMTYuMTEuMjAyMQ==?=

2. View this message in message list

OBSERVED RESULT
Subject is displayed as:
Кассовый чек от ФГА��УВО "ДВФУ" за 16.11.2021

EXPECTED RESULT
Subject should be displayed as:
Кассовый чек от ФГАОУВО "ДВФУ" за 16.11.2021

SOFTWARE/OS VERSIONS
Linux: 5.3.18-lp152.98-default , x86_64
KDE Plasma Version:  5.18.6
KDE Frameworks Version: 5.71.0
Qt Version: 5.12.7 (built with version 5.12.7)

ADDITIONAL INFORMATION
If message is composed in KMail2 itself, then its subject is single-lined:

Subject: =?UTF-8?B?0JrQsNGB0YHQvtCy0YvQuSDRh9C10Log0L7RgiDQpNCT0JDQntCj0JLQniAi0JTQktCk0KMiINC30LA=?= 16.11.2021

and this problem doesn't appear.