Bug 181486 - Decoding error in compound base64/UTF-8 MIME Subject field.
Summary: Decoding error in compound base64/UTF-8 MIME Subject field.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: SVN trunk (KDE 4)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-21 11:06 UTC by P. Varet
Modified: 2015-04-12 09:53 UTC (History)
1 user (show)

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 P. Varet 2009-01-21 11:06:18 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

SYNOPSIS:

KMail fails to properly decode this compound subject in an email:
=?UTF-8?B?Q2VjaSBlc3QgdW4gdGVzdCwgdW4gdGVzdC4uLiBldCBqZSBsJ2FpIHRlc3TD?= =?UTF-8?B?qSwgZWggb3VpIQ==?=


EXPECTED RESULT:

A subject line of 'Ceci est un test, un test... et je l'ai testé, eh oui!'.


ACTUAL RESULT:

'Ceci est un test, un test... et je l'ai test��, eh oui!'


ANALYSIS:

In this example, the sender split the base64-encoded, UTF-8 Subject header into several lines of under 80 characters, which is okay. The problem is that the split happens in the middle of the UTF-8 representation of the character 'é': the first part of the base64-decoded string ends with '\xC3' and the second part begins with '\xA9'.

KMail thus fails to decode that character properly.


QUESTION:

*Should* KMail try to display this subject correctly? KMail has all the information it needs to do so, but the sender (Request Tracker, if I must name it) was clearly being a wee bit incautious, there.

Thanks.
Comment 1 Jaime Torres 2009-02-01 11:52:17 UTC
This bug seems related to bug 173503.
Comment 2 P. Varet 2010-01-30 15:22:48 UTC
(In reply to comment #1)
> This bug seems related to bug 173503.

Doubtful. That bug has to do with the encoding of the character '%'. This one is about the UTF-8 binary representation of an accented character being split over two different base64 strings.
Comment 3 Laurent Montel 2015-04-12 09:53:31 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.