Bug 40069: Fix encoding of stdout and stderr
Set stdout and stder encoding based on nl_langinfo, or LC_ALL and LANG locale environment variables, as suggested on https://perldoc.perl.org/open.
Tested with rbm/rbm showconf browser build --target torbrowser-windows-x86_64 --target nightly --target testbuild in tor-browser-build, looking at the line VIAddVersionKey "LegalCopyright" "© [% pc('firefox', 'var/copyright_year') %] ....
/closes #40069 (closed)