QDebug escapes non-printable characters. Try to change qDebug() with qDebug().noquote().