From 5df9a95d2c5b285967ca5e4c7167bf4a96f76221 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 6 Mar 2013 11:00:27 +0100 Subject: [PATCH] don't clobber 8-bit output otherwise it becomes useless for utf-8. the output is encoded as local8bit, so it shouldn't be garbage. Change-Id: I68e59bddb092ac53746f421a90e3803632dbf1c6 Reviewed-by: Thiago Macieira --- src/testlib/qabstracttestlogger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testlib/qabstracttestlogger.cpp b/src/testlib/qabstracttestlogger.cpp index da7e793341..d039c3c342 100644 --- a/src/testlib/qabstracttestlogger.cpp +++ b/src/testlib/qabstracttestlogger.cpp @@ -82,9 +82,9 @@ QAbstractTestLogger::~QAbstractTestLogger() void QAbstractTestLogger::filterUnprintable(char *str) const { - char *idx = str; + unsigned char *idx = reinterpret_cast(str); while (*idx) { - if (((*idx < 0x20 && *idx != '\n' && *idx != '\t') || *idx > 0x7e)) + if (((*idx < 0x20 && *idx != '\n' && *idx != '\t') || *idx == 0x7f)) *idx = '?'; ++idx; }