3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-03 11:25:40 +00:00

escape ascii above 127, issue #1571

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-04-12 15:05:35 +08:00
parent 5cff0de844
commit aef3de5fca

View file

@ -213,6 +213,9 @@ std::string zstring::encode() const {
else if (ch == '\\') { else if (ch == '\\') {
strm << "\\\\"; strm << "\\\\";
} }
else if (ch >= 128) {
strm << "\\x" << std::hex << (unsigned)ch << std::dec;
}
else { else {
strm << (char)(ch); strm << (char)(ch);
} }