Bug 416758

Summary: Encoding broken
Product: [Applications] kontact Reporter: Axel Braun <axel.braun>
Component: mailAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: major CC: cookie170, miso, montel, null, okurz, vinz
Priority: NOR    
Version: 5.14.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.14.0
Attachments: Wrong encoding example

Description Axel Braun 2020-01-25 16:59:12 UTC
SUMMARY
I have received mail in german language, where it says in the header:

This is a multipart message in MIME format.

------=_NextPart_000_014F_01D5D2D4.EC19EF40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Anyway, kmail does not display the mail correctly, and it comes through as 

Viele Grüße und ein schönes Wochenende

changing the encoding manually does not change anything. When I reply to the mail, encoding is OK!

Plasma 5.17.5
Framework 5.66.0
QT 5.14.0
openSUSE Tumbleweed 20200123
Comment 1 Laurent Montel 2020-02-17 07:46:40 UTC
I confirm it (it works fine in textplain but html version there is a problem).
I will investigate it this week (sorry in vacation so I will not work a lot this week but I will try to take some hours on it :) )
Comment 2 Vinzenz Vietzke [TUXEDO] 2020-02-17 12:55:03 UTC
I can confirm the issue with Kmail 5.13.2:

------->8--------

-------- Ursprüngliche Nachricht --------
Von: REDACTED
Datum: 17.02.20 10:07 (GMT+01:00)
An: REDACTED
Betreff: FW: Umstellung auf das ursprüngliche Verfahren für 

[…]
Mit freundlichen Grüßen / Best Regards

-------8<--------


System information

Operating System: openSUSE Tumbleweed 20200211
KDE Plasma Version: 5.18.0
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1
Kernel Version: 5.5.2-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 62,8 GiB
Comment 3 Laurent Montel 2020-02-18 19:15:43 UTC
Now I know why there is the problem but I don"t have a fix yet.
I continue to investigate it
Comment 4 Laurent Montel 2020-02-27 07:47:11 UTC
Git commit 32c76b466747e417fd63e6c5b305cc673a8bebd8 by Laurent Montel.
Committed on 27/02/2020 at 07:46.
Pushed by mlaurent into branch 'master'.

Start to fix encoding problem
Related: bug 418161

M  +1    -0    messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp
M  +10   -0    messageviewer/src/interfaces/htmlwriter.cpp
M  +4    -2    messageviewer/src/interfaces/htmlwriter.h

https://commits.kde.org/messagelib/32c76b466747e417fd63e6c5b305cc673a8bebd8
Comment 5 Laurent Montel 2020-02-27 13:05:25 UTC
Git commit a95b0fc382c0f035265223feb28a9e74c4fc6431 by Laurent Montel.
Committed on 27/02/2020 at 13:04.
Pushed by mlaurent into branch 'master'.

Fix Bug 416758 - Encoding broken
Related: bug 418161
FIXED-IN: 5.14.0

M  +2    -2    messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp
M  +2    -1    messageviewer/src/viewer/viewer_p.cpp

https://commits.kde.org/messagelib/a95b0fc382c0f035265223feb28a9e74c4fc6431
Comment 6 Alexander 2020-05-02 10:41:48 UTC
Not fixed as of May 02nd!

Forwarded html-messages in _some_ cases still can't display umlaute in the forwarded text. From an HTML-E-Mail forwarded to me:

== == == == == == 

Sehr geehrte Eltern, liebe Schülerinnen,

die geplante stufenweise Öffnung der Schulen bedeutet, dass es am Montag, dem 4. Mai 2020 auch am XXX mit dem Präsenzunterricht für die Klasse 10 sowie die MSS 11 und 12 losgeht. Viele Schülerinnen und auch unsere Lehrkräfte freuen sich nach den vielen Wochen der Distanz bereits auf den Beginn eines „normalen“ Schulalltags. Wir sagen ihnen bereits jetzt ein herzliches Willkommen!

Dieser Wiederbeginn wird allerdings unter besonderen Bedingungen erfolgen müssen, die maßgeblich vom „Hygieneplan-Corona für die Schulen in Rheinland-Pfalz“ gesteckt sind. Diesen Plan habe ich hier zur Kenntnisnahme angehängt.

== == == == == == 

And -- very strange -- the warning message in German, that external references not have been loaded is in _some_ cases as well »infected«:

== == == == == == 
Hinweis: Diese Nachricht im HTML-Format k�nnte externe Referenzen auf z. B. Bilder enthalten. Aus Sicherheitsgr�nden werden externe Referenzen nicht geladen. Falls der Absender vertrauensw�rdig ist, aktivieren Sie externe Referenzen, indem Sie hier klicken.
== == == == == == 

So the bug is still alive.

Operating System: openSUSE Tumbleweed 20200425
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1
Kernel Version: 5.6.6-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i7-5600U CPU @ 2.60GHz
Memory: 7,5 GiB
Comment 7 Laurent Montel 2020-05-02 11:09:08 UTC
Test case please.
(save as mbox file please)
Comment 8 Michal Hlavac 2020-05-03 12:53:03 UTC
Created attachment 128111 [details]
Wrong encoding example
Comment 9 null 2020-05-05 22:49:03 UTC
I could reproduce the issue with the test case from Comment 8. However, after ea14bb921d43 in messagelib it seems to be fixed (did not try to reproduce with the other cases mentioned above, though).

Might be worth trying again once 5.14.1 shipped, and possibly attach an mbox test case if it is still failing for you. Otherwise close as fixed.
Comment 10 Alexander 2020-05-23 19:53:22 UTC
Fixed with version that came to openSuse TW as Apps update 20.04.1.