diff --git a/src/util/unicode.cpp b/src/util/unicode.cpp index 6ea0e3cc364..6e0c483ec08 100644 --- a/src/util/unicode.cpp +++ b/src/util/unicode.cpp @@ -298,10 +298,16 @@ std::string utf16_little_endian_to_java(const std::wstring &in) result << "\\n"; else if(ch=='\r') result << "\\r"; + else if(ch=='\f') + result << "\\f"; + else if(ch=='\b') + result << "\\b"; + else if(ch=='\t') + result << "\\t"; else if(ch<=255 && isprint(ch, loc)) { const auto uch=static_cast(ch); - if(uch=='"') + if(uch=='"' || uch=='\\') result << '\\'; result << uch; }