fix the incompatible character encodings: ASCII-8BIT and UTF-8 error when showing output

Make sure the output is clean so that you can view the build log. else...nothing is shown.