Skip to content

Commit

Permalink
Revert 'fix' that broke UTF8 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
brunexgeek committed Nov 1, 2021
1 parent 5dd4fac commit 4a8bf8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions protogen.hh
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,7 @@ struct json<std::string, void>
case '\r': (*ctx.os) << "\\r"; break;
case '\n': (*ctx.os) << "\\n"; break;
case '\t': (*ctx.os) << "\\t"; break;
default:
// TODO: escape control character instead of removing it
if (*it >= 32) (*ctx.os) << *it;
default: (*ctx.os) << *it;
}
}
(*ctx.os) << '"';
Expand Down
2 changes: 2 additions & 0 deletions tests/tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ bool RUN_TEST1( int argc, char **argv)
number.type = false;
person.phones.push_back(number);

book.people.push_back(person);

std::string json1;
std::string json2;
phonebook::AddressBook temp;
Expand Down

0 comments on commit 4a8bf8b

Please sign in to comment.