diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 2c06abf6dcd263d741a7fb2b7ba109554b56a691..65e6c22f38e4fcbc8e24d9caead2697e4c78f60d 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -179,7 +179,7 @@ static int trace_event_printer(enum binary_printer_ops op, break; case BINARY_PRINT_CHAR_DATA: printed += color_fprintf(fp, color, "%c", - isprint(ch) ? ch : '.'); + isprint(ch) && isascii(ch) ? ch : '.'); break; case BINARY_PRINT_CHAR_PAD: printed += color_fprintf(fp, color, " ");