GUIs using sie file die on Windows quotation marks

We already parse the string character by character escaping newlines, tabs, and
other special characters.  In the case of these quotation marks, we replace them
with the ASCII single and double quotes.

refs #134
This commit is contained in:
Alex Lin 2015-10-06 15:20:50 -05:00
parent 01a8294dd8
commit 634f25bee3

View File

@ -231,6 +231,10 @@ void FieldDescription::parseComment(std::string comment) {
case '\r':
case '\t':
case ' ': if ( ! is_space ) ss << " "; is_space = true ; break;
// -110 to -108 (signed char) are the Windows quotation marks. We ASCII-fy them.
case -110 : ss << "'" ; break;
case -109 : ss << "\\\"" ; break;
case -108 : ss << "\\\"" ; break;
default: ss << *it; is_space = false ; break;
}
}