Project

General

Profile

Actions

Bug #5570

closed

Encoding of environment variables on Windows

Added by now (Nikolai Weibull) over 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-09-13 revision 33263) [i386-mingw32]
Backport:
[ruby-core:40737]

Description

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0