Fixed #8432 (Problem with dump files and non-ASCII characters)

This commit is contained in:
Daniel Marjamäki 2018-03-30 22:34:55 +02:00
parent e9fefcac46
commit da4fc25fee
1 changed files with 1 additions and 2 deletions

View File

@ -546,7 +546,6 @@ std::string ErrorLogger::ErrorMessage::FileLocation::stringify() const
std::string ErrorLogger::toxml(const std::string &str) std::string ErrorLogger::toxml(const std::string &str)
{ {
std::ostringstream xml; std::ostringstream xml;
const bool isstring(str[0] == '\"');
for (std::size_t i = 0U; i < str.length(); i++) { for (std::size_t i = 0U; i < str.length(); i++) {
char c = str[i]; char c = str[i];
switch (c) { switch (c) {
@ -566,7 +565,7 @@ std::string ErrorLogger::toxml(const std::string &str)
xml << "\\0"; xml << "\\0";
break; break;
default: default:
if (!isstring || (c >= ' ' && c <= 'z')) if (c >= ' ' && c <= 'z')
xml << c; xml << c;
else else
xml << 'x'; xml << 'x';