From fa6c1dba0693ece115d722308dcd5b6e390b402f Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 10 Feb 2010 09:41:36 +0000 Subject: [PATCH] Don't quote if no encoding is needed. --- src/word.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)