[M-git] Mahogany sources repository. branch master updated. v0.67-784-g00c2f6e3
Vadim Zeitlin via Mahogany-cvsupdates <[email protected]> Tue, 30 Jul 2019 11:35:04 +0000
| Newsgroups | gmane.mail.mahogany.cvs |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 00c2f6e361e64045af6559ab98f9f09bcf22a87d (commit)
from 1b285d6ff380a49571eb766a03257670551719d4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 00c2f6e361e64045af6559ab98f9f09bcf22a87d
Author: Vadim Zeitlin <[email protected]>
Date: Tue Jul 30 13:30:08 2019 +0200
Decode PGP-encoded messages using UTF-8 instead of Latin-1
The decryption code seems to assume that anything coming back from gpg
is UTF-8 encoded which is probably not correct (to be tested with
encrypted messages using Content-Type charset different from UTF-8), but
as long as it does this, we need to use utf8_str() to work with decoded
data and not To8BitData().
This fixes showing encrypted messages with non-ASCII characters, which
previously couldn't be shown at all.
diff --git a/src/classes/MessageView.cpp b/src/classes/MessageView.cpp
index a73f5d37..3f8b98a6 100644
--- a/src/classes/MessageView.cpp
+++ b/src/classes/MessageView.cpp
@@ -2627,8 +2627,8 @@ MessageView::ProcessEncryptedMultiPart(const MimePart *mimepart)
// messages created under Unix systems, but c-client functions used
// in MimePartVirtual do expect a message in canonical format so we
// must ensure that we do have CR LFs
- MimePartVirtual *mpv = new
- MimePartVirtual(strutil_enforceCRLF(decryptedData).To8BitData());
+ const String dataCRLF = strutil_enforceCRLF(decryptedData);
+ MimePartVirtual *mpv = new MimePartVirtual(dataCRLF.utf8_str());
if ( mpv->IsOk() )
{
-----------------------------------------------------------------------
Summary of changes:
src/classes/MessageView.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Mahogany sources repository.