Skip to content
Commit 60092910 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau Committed by Sandro Knauß
Browse files

EncryptedBodyPartFormatter::process(): fix use of encoding on decrypting

Two issues in the old code:
1) it hardcoded "utf-8" as encoding to use for interpreting the
decrypted data initially, but then used nodeHelper()->codec(node) on
handling the linebreaks, which might be some other charset, as taken from
the content-type or by what was enforced as interpretation via the
NodeHelper::setOverrideCodec().
2) the temporary KMime::Content helper object got the (wrongly hardcoded)
encoding set via object API (tempNode->contentType()->setCharset()) which
though is discarded due to the parse() call afterwards. To match the
tempNode->setBody() call the content-type header also needs to be set by
using the string-oriented API.
parent 15e6585b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment