From 0633a49b049de934f11fee89c2cd448f4694f20e Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 5 Apr 2012 23:15:04 +0200 Subject: Fixed wrong encoding of line breaks in QP-encoded text (issue #7). --- src/utility/encoder/qpEncoder.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/utility/encoder/qpEncoder.cpp') diff --git a/src/utility/encoder/qpEncoder.cpp b/src/utility/encoder/qpEncoder.cpp index aa95022f..ab8db2e4 100644 --- a/src/utility/encoder/qpEncoder.cpp +++ b/src/utility/encoder/qpEncoder.cpp @@ -292,14 +292,15 @@ utility::stream::size_type qpEncoder::encode(utility::inputStream& in, case 13: // CR case 10: // LF { - // Text mode (where using CRLF or LF or ... does not - // care for a new line...) - if (text) + // RFC-2045/6.7(4) + + // Text data + if (text && !rfc2047) { outBuffer[outBufferPos++] = c; ++curCol; } - // Binary mode (where CR and LF bytes are important!) + // Binary data else { QP_ENCODE_HEX(c); -- cgit v1.2.3