<table><tr><td style="">dvratil created this revision.<br />dvratil added a project: KDE PIM.<br />Restricted Application added a subscriber: KDE PIM.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5737" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Use base64 encoding for all non-text attachments, only use KMime::encodingForData()<br />
for text/* and message/* attachments.</p>

<p>KMime::encodingForData() uses character occurrence frequency to choose optimal encoding,<br />
but in case of binary documents (like PDF) this can get completely off and choose the wrong<br />
encoding and CRLF/LF conversion then corrupts the binary data, making the attachment unreadable.</p>

<p>See <a href="https://bugs.kde.org/show_bug.cgi?id=95733" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=95733</a> for details</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R94 PIM: Message Library</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5737" rel="noreferrer">https://phabricator.kde.org/D5737</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>messagecore/src/attachment/attachmentpart.cpp</div></div></div><br /><div><strong>To: </strong>dvratil, mlaurent<br /><strong>Cc: </strong>KDE PIM, dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>