summaryrefslogtreecommitdiff
path: root/src/shared/logs-show.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-08-18 16:26:11 +0200
committerDaniel Mack <daniel@zonque.org>2015-08-18 16:26:11 +0200
commit91a8a108096164c9425e027a5876dfe51890f1e7 (patch)
treee9a304eb410ae304ed0acb81441dffb769aad2d0 /src/shared/logs-show.c
parent9a877fd409b91c43c301d293ad682a8454bcdbcf (diff)
journal: fix json output of unicode characters
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r--src/shared/logs-show.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index b78cb7678c..60144ab8a6 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -575,7 +575,6 @@ void json_escape(
assert(p);
if (!(flags & OUTPUT_SHOW_ALL) && l >= JSON_THRESHOLD)
-
fputs("null", f);
else if (!utf8_is_printable(p, l)) {
@@ -605,8 +604,8 @@ void json_escape(
fputc(*p, f);
} else if (*p == '\n')
fputs("\\n", f);
- else if (*p < ' ')
- fprintf(f, "\\u%04x", *p);
+ else if ((uint8_t) *p < ' ')
+ fprintf(f, "\\u%04x", (uint8_t) *p);
else
fputc(*p, f);