SysTools: Don't fail on encoding errors
Given #25570, I think it's unnecessarily risky to use the system encoding when capturing the output of SysTools.
Instead, it would be nice to:
- Instructs SysTools to produce their output as
UTF-8
- Decode the output of SysTools with
UTF-8//TRANSLIT
, which replaces invalid byte sequences with replacement characters.
This is what this MR implements, provide that newlocale
is available (part of POSIX.1-2008).
Edited by Simon Hengel