From b6cc695e957d579945198fb1ec1d9064c120de19 Mon Sep 17 00:00:00 2001 From: Pablo2048 Date: Sun, 13 May 2018 15:59:40 +0200 Subject: [PATCH] Primitivni prevod netisknutelnych znaku do Unicode. --- src/trace.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/trace.cpp b/src/trace.cpp index 896dbaa..653e50e 100644 --- a/src/trace.cpp +++ b/src/trace.cpp @@ -109,7 +109,15 @@ static String _getText(const char *buffer) break; default: - res.concat(*buffer); + if (*buffer < 128) + res.concat(*buffer); + else + { + char chr[3]; + res.concat(F("\\u00")); + sprintf_P(chr, PSTR("%02X"), *buffer); + res.concat(chr); + } break; } ++buffer;