Skip to content

waf_unit_test: prevent error when dumping run to script and environment contains UTF-8 chars

Federico Pellegrin requested to merge fedepell/waf:waf_ut_enc into master

Since by default latin-1 is used with Python3 when the decode is called if UTF-8 chars are present in the environment it will generate an traceback. This PR puts UTF-8 as default encoding (as in other cases through the code) to prevent this.

To reproduce the problem:

cd demos/unit_test
export UNICODE_VAR=✘ 
waf configure
waf --dump-test-scripts

Merge request reports