alliedmodders / ambuild

AlliedModders C++ Build System
BSD 3-Clause "New" or "Revised" License
60 stars 31 forks source link

Fix check_output erroring due to incorrect encoding #161

Closed zer0k-z closed 6 months ago

zer0k-z commented 7 months ago

There's no guarantee that the encoding of subprocess.check_output is utf-8, so characters like ä inside the environment will cause msvc_utils.DeduceEnv to throw an exception. The PR adds a function that finds the correct code page so the output can be decoded properly.