Project

General

Profile

Actions

Bug #4854

closed

Invalid locale_charmap (CP0) when running as Windows Service

Added by rafal.bigaj (Rafal Bigaj) over 13 years ago. Updated over 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 #1

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r31985.
Rafal, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Actions

Also available in: Atom PDF

Like0
Like0