mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +00:00
unicode strings now writing as is, without escaping
This commit is contained in:
parent
0beeaf93ef
commit
7613aa4e97
1 changed files with 3 additions and 2 deletions
|
|
@ -67,10 +67,11 @@ std::string escape_string(std::string s) {
|
||||||
case '"': ss << "\\\""; break;
|
case '"': ss << "\\\""; break;
|
||||||
case '\\': ss << "\\\\"; break;
|
case '\\': ss << "\\\\"; break;
|
||||||
default:
|
default:
|
||||||
if (c < ' ') {
|
/*if (c < ' ') {
|
||||||
ss << "\\" << std::oct << uint(ubyte(c));
|
ss << "\\" << std::oct << uint(ubyte(c));
|
||||||
break;
|
break;
|
||||||
}
|
}*/
|
||||||
|
// write it utf-8 encoded as is
|
||||||
ss << c;
|
ss << c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue