Skip to content

Commit 4a8bf8b

Browse files
committed
Revert 'fix' that broke UTF8 characters
1 parent 5dd4fac commit 4a8bf8b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

protogen.hh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,7 @@ struct json<std::string, void>
829829
case '\r': (*ctx.os) << "\\r"; break;
830830
case '\n': (*ctx.os) << "\\n"; break;
831831
case '\t': (*ctx.os) << "\\t"; break;
832-
default:
833-
// TODO: escape control character instead of removing it
834-
if (*it >= 32) (*ctx.os) << *it;
832+
default: (*ctx.os) << *it;
835833
}
836834
}
837835
(*ctx.os) << '"';

tests/tests.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ bool RUN_TEST1( int argc, char **argv)
5353
number.type = false;
5454
person.phones.push_back(number);
5555

56+
book.people.push_back(person);
57+
5658
std::string json1;
5759
std::string json2;
5860
phonebook::AddressBook temp;

0 commit comments

Comments
 (0)