From 9fdf280d4c7eab38c620698dacdc1c7d0099ae6b Mon Sep 17 00:00:00 2001 From: Zbynek Moravec Date: Tue, 1 Sep 2015 13:33:58 +0200 Subject: [PATCH 1/2] Fix strange characters in report after remote scan Only when you use ssh to scan (local) machine, In report you will get some strange characters These characters are   (nbsp) --- src/ProcessHelpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProcessHelpers.cpp b/src/ProcessHelpers.cpp index 5b2162e6..19f7bce7 100644 --- a/src/ProcessHelpers.cpp +++ b/src/ProcessHelpers.cpp @@ -163,8 +163,8 @@ void SyncProcess::run() mRunning = false; - mStdOutContents = process.readAllStandardOutput(); - mStdErrContents = process.readAllStandardError(); + mStdOutContents = QString::fromUtf8(process.readAllStandardOutput()); + mStdErrContents = QString::fromUtf8(process.readAllStandardError()); // TODO: We are duplicating data here! mDiagnosticInfo += "stdout:\n===============================\n" + QString(mStdOutContents) + QString("\n"); From 90c979f9b3941e58b99e55dba1e509ae578454aa Mon Sep 17 00:00:00 2001 From: Zbynek Moravec Date: Tue, 1 Sep 2015 16:44:01 +0200 Subject: [PATCH 2/2] Use fromLocal8bit instead of fromUtf8 while reading of process stdout --- src/ProcessHelpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProcessHelpers.cpp b/src/ProcessHelpers.cpp index 19f7bce7..afeaa42f 100644 --- a/src/ProcessHelpers.cpp +++ b/src/ProcessHelpers.cpp @@ -163,8 +163,8 @@ void SyncProcess::run() mRunning = false; - mStdOutContents = QString::fromUtf8(process.readAllStandardOutput()); - mStdErrContents = QString::fromUtf8(process.readAllStandardError()); + mStdOutContents = QString::fromLocal8Bit(process.readAllStandardOutput()); + mStdErrContents = QString::fromLocal8Bit(process.readAllStandardError()); // TODO: We are duplicating data here! mDiagnosticInfo += "stdout:\n===============================\n" + QString(mStdOutContents) + QString("\n");