diff options
author | Vincent Richard <[email protected]> | 2012-04-05 21:15:04 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2012-04-05 21:15:04 +0000 |
commit | 0633a49b049de934f11fee89c2cd448f4694f20e (patch) | |
tree | 482c0bc990a4b2f98ef81256bac331499ba6379d /src/utility/encoder/qpEncoder.cpp | |
parent | Added tests for Quoted-Printable encoding. (diff) | |
download | vmime-0633a49b049de934f11fee89c2cd448f4694f20e.tar.gz vmime-0633a49b049de934f11fee89c2cd448f4694f20e.zip |
Fixed wrong encoding of line breaks in QP-encoded text (issue #7).
Diffstat (limited to 'src/utility/encoder/qpEncoder.cpp')
-rw-r--r-- | src/utility/encoder/qpEncoder.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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); |