Actions
Bug #4854
closedInvalid locale_charmap (CP0) when running as Windows Service
Description
When ruby process is run as Windows Service the console codepage is not set, GetConsoleCP returns 0.
As a result function rb_locale_charmap refers to not existing codepage: CP0.
It has a dramatic performance drawback on the system when for ex. enumerating through ENV.
The attached patch simple checks if the GetConsoleCP() returns 0 and if so uses the actual system codepage.
Files
Actions
Like0
Like0