diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index e55114f0336f..682146d04379 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -143,7 +143,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, " ");