Encoding:  Fix a few encoding problems with ctest.

This also fixes some test failures on Windows when the
name of the build directory contains non-ascii characters.
Merge topic 'encoding-ctest-fixes' into next

5e01ee2e Encoding:  Fix a few encoding problems with ctest.