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
Please register or sign in to comment