[ruby-core:76677] [Ruby trunk Bug#12650] Use UTF-8 encoding for ENV on Windows

From: usa@...
Date: 2016-08-03 05:36:30 UTC
List: ruby-core #76677
Issue #12650 has been updated by Usaku NAKAMURA.


We don't want to break compatibility.
Wait Ruby3.

----------------------------------------
Bug #12650: Use UTF-8 encoding for ENV on Windows
https://bugs.ruby-lang.org/issues/12650#change-59894

* Author: Dト」is Mosト]s
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.4.0dev (2016-08-02 trunk 55799) [x64-mswin64_140]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Windows environment variables supports Unicode (same wide WinAPI) and so there's no reason to limit ourselves to any codepage.
Currently ENV would use locale's encoding (console's codepage) which obviously won't work correctly for characters outside of those codepages.

I've attached a patch which implements this and fixes bug #9715


---Files--------------------------------
0001-Always-use-UTF-8-encoded-environment-on-Windows.patch (3.64 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next