winruby UTF8 Fallback for no CodePage
This is to deal specifically with setting the Region to Arabic which
sets the codepage to 720. This codepage isn't recognised by Ruby which
causes it to fail during initialisation when setting up LOCALE.
This patch to Ruby is necessary to handle languages/regions on windows
where the codepage is not supported by Ruby such as Arabic which uses
If the codepage is not found, the Locale falls back to UTF8.
This is a well known Ruby/Ruby on Rails issue which is described at
Opened PR: https://github.com/ruby/ruby/pull/2518
Updated by gabuscus (Gabriel Nagy) about 1 month ago
duerst (Martin Dürst) wrote:
If codepage 720 is not supported, then we should look at supporting it.
fair point, however investigation on this Puppet ticket: https://tickets.puppetlabs.com/browse/PA-2191 concluded that falling back to UTF-8 fixes the issue (for codepage 720 at least). we could also check the codepage when catching the ArgumentError so we fallback only in that case
edit: also I'm not sure what does adding a new codepage entail? I agree that would be the cleaner solution