From: mame@... Date: 2019-12-09T10:20:39+00:00 Subject: [ruby-core:96155] [Ruby master Bug#15044] ENV encoding not UTF-8 by default Issue #15044 has been updated by mame (Yusuke Endoh). Status changed from Open to Closed It is intentional according to naruse. The encoding of ENV depends on the environment variable LANG. ---------------------------------------- Bug #15044: ENV encoding not UTF-8 by default https://bugs.ruby-lang.org/issues/15044#change-83029 * Author: lowang (Przemyslaw Wroblewski) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- ~~~ $ irb 2.5.1 :001 > 'secret'.encoding => # 2.5.1 :002 > ENV['PASS'] = 'secret'; ENV['PASS'].encoding => # 2.5.1 :009 > ENV['PASS'] = '��' => "\u0141" 2.5.1 :010 > ENV['PASS'].encoding => # ~~~ I would expect all encodings to be **UTF-8** at all times -- https://bugs.ruby-lang.org/ Unsubscribe: