diff options
author | Vincent Richard <[email protected]> | 2010-02-10 09:41:36 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2010-02-10 09:41:36 +0000 |
commit | fa6c1dba0693ece115d722308dcd5b6e390b402f (patch) | |
tree | dd63bdcc97404849844e106c0058eacceea05a74 | |
parent | Allow spaces to appear in mailbox display name without encoding or quoting. E... (diff) | |
download | vmime-fa6c1dba0693ece115d722308dcd5b6e390b402f.tar.gz vmime-fa6c1dba0693ece115d722308dcd5b6e390b402f.zip |
Don't quote if no encoding is needed.
-rw-r--r-- | src/word.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/word.cpp b/src/word.cpp index f24d6313..667f1fbb 100644 --- a/src/word.cpp +++ b/src/word.cpp @@ -357,7 +357,8 @@ void word::generate(utility::outputStream& os, const string::size_type maxLineLe // - the whole buffer is ASCII-only // - the buffer does not contain quoting character (") // - there is enough remaining space on the current line to hold the whole buffer - if ((flags & text::QUOTE_IF_POSSIBLE) && + if (!noEncoding && + (flags & text::QUOTE_IF_POSSIBLE) && asciiCount == m_buffer.length() && m_buffer.find('"') == string::npos && (curLineLength + 2 /* 2 x " */ + m_buffer.length()) < maxLineLength) |