Rationale from issue core#13869:
Currently Bitcoin uses the ANSI encoding on Windows so that it would affected by user's language settings, they might not able to open some non-ASCII name files.
This should unbreak the windows build, which was broken by D10801.
This is a backport of core#13888
Depends on D10816