diff --git a/common/pythonfileformat.cpp b/common/pythonfileformat.cpp index cd9f37e..cec283b 100644 --- a/common/pythonfileformat.cpp +++ b/common/pythonfileformat.cpp @@ -450,7 +450,7 @@ void PythonFileFormat::writeFieldAssignment( std::string val = fieldDesc->is_repeated() ? refl->GetRepeatedStringReference(msg, fieldDesc, index, &val) : refl->GetStringReference(msg, fieldDesc, &val); - QString escVal = escapeString(val.c_str()); + QString escVal = escapeString(QString::fromStdString(val)); if (val != fieldDesc->default_value_string()) out << fieldName << " = '" << escVal << "'\n"; break;