Project

General

Profile

Actions

Bug #4854

closed

Invalid locale_charmap (CP0) when running as Windows Service

Added by rafal.bigaj (Rafal Bigaj) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2p136
Backport:
[ruby-core:36832]

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

encoding.codepage.patch (531 Bytes) encoding.codepage.patch rafal.bigaj (Rafal Bigaj), 06/08/2011 04:38 PM
Actions

Also available in: Atom PDF

Like0
Like0