From: Nobuyoshi Nakada Date: 2012-03-12T06:44:04+09:00 Subject: [ruby-core:43237] [ruby-trunk - Bug #5570][Feedback] Encoding of environment variables on Windows Issue #5570 has been updated by Nobuyoshi Nakada. Status changed from Assigned to Feedback Target version set to 2.0.0 Which codepage should be used there, ACP or OEMCP? ---------------------------------------- Bug #5570: Encoding of environment variables on Windows https://bugs.ruby-lang.org/issues/5570 Author: Nikolai Weibull Status: Feedback Priority: Normal Assignee: Usaku NAKAMURA Category: core Target version: 2.0.0 ruby -v: ruby 1.9.3dev (2011-09-13 revision 33263) [i386-mingw32] It seems that the filesystem encoding is forced upon environment variables. There is, however, no guarantee that this encoding is the correct one. Getenv() probably shouldn���t be used on Windows at all. Using _wgetenv instead should guarantee that the returned result is encoded properly and it can then be converted to the filesystem encoding. -- http://bugs.ruby-lang.org/