Set default for Encoding.default_external to UTF-8 on Windows
This issue is related to https://bugs.ruby-lang.org/issues/13488 where we already discussed the topic an postponed the change for ruby-3. Patch is here:
Currently Encoding.default_external
is initialized to the local console encoding of the Windows installation unless changed per option -E
. This is e.g. cp850 for Western Europe. It should be changed to UTF-8.
RubyInstaller provided a checkbox for RUBYOPT=-Eutf-8
since version 2.4.
This checkbox was disabled per default, but I noticed from bug reports, that many people enabled it.
With RubyInstaller-2.7.0 this checkbox is enabled per default.
So we already have a steady migration towards UTF-8 on Windows.