From 634f25bee33476c8fd34e6a850960563eda9215a Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Tue, 6 Oct 2015 15:20:50 -0500 Subject: [PATCH] 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 --- trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp b/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp index f9a598c8..af3d585c 100644 --- a/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp +++ b/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp @@ -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; } }