[ruby-core:120277] [Ruby master Bug#20958] fix ENV.keys encoding on windows
Issue #20958 has been reported by YO4 (Yoshinao Muramatsu). ---------------------------------------- Bug #20958: fix ENV.keys encoding on windows https://bugs.ruby-lang.org/issues/20958 * Author: YO4 (Yoshinao Muramatsu) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- [github PR#12368](https://github.com/ruby/ruby/pull/12368) ENV.keys elements contain UTF-8 byte sequences with locale encoding on Windows. ```
ruby -v -e "p ENV.keys.last; p ENV.keys.last.encoding; p ENV.keys.last.dup.force_encoding('utf-8')" ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x64-mingw-ucrt] "\x{E383}\x{86E3}\x{82B9}\x{E383}\x88" #<Encoding:Windows-31J> "テスト"
This patch changes the encoding of ENV.keys to utf-8 on Windows.
--
https://bugs.ruby-lang.org/
Issue #20958 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Open to Closed https://github.com/ruby/ruby/pull/12368 has been merged. Thanks! ---------------------------------------- Bug #20958: fix ENV.keys encoding on windows https://bugs.ruby-lang.org/issues/20958#change-118211 * Author: YO4 (Yoshinao Muramatsu) * Status: Closed * Assignee: windows * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- [github PR#12368](https://github.com/ruby/ruby/pull/12368) ENV.keys elements contain UTF-8 byte sequences with locale encoding on Windows. ```
ruby -v -e "p ENV.keys.last; p ENV.keys.last.encoding; p ENV.keys.last.dup.force_encoding('utf-8')" ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x64-mingw-ucrt] "\x{E383}\x{86E3}\x{82B9}\x{E383}\x88" #<Encoding:Windows-31J> "テスト"
This patch changes the encoding of ENV.keys to utf-8 on Windows.
--
https://bugs.ruby-lang.org/
Issue #20958 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.3: WONTFIX, 3.4: REQUIRED, 4.0: REQUIRED to 3.3: WONTFIX, 3.4: DONE, 4.0: REQUIRED ruby_3_4 commit:d784a0b8a5c1f9ca59f95779c6a07eb7c69e223d merged revision(s) commit:239a472609db43bf8a5388c4c8da11b1a4b322f6, commit:d29afc8ab801ab3d32fcd787e43fbae7ea2630a6. ---------------------------------------- Bug #20958: fix ENV.keys encoding on windows https://bugs.ruby-lang.org/issues/20958#change-118460 * Author: YO4 (Yoshinao Muramatsu) * Status: Closed * Assignee: windows * Backport: 3.3: WONTFIX, 3.4: DONE, 4.0: REQUIRED ---------------------------------------- [github PR#12368](https://github.com/ruby/ruby/pull/12368) ENV.keys elements contain UTF-8 byte sequences with locale encoding on Windows. ```
ruby -v -e "p ENV.keys.last; p ENV.keys.last.encoding; p ENV.keys.last.dup.force_encoding('utf-8')" ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x64-mingw-ucrt] "\x{E383}\x{86E3}\x{82B9}\x{E383}\x88" #<Encoding:Windows-31J> "テスト"
This patch changes the encoding of ENV.keys to utf-8 on Windows.
--
https://bugs.ruby-lang.org/
Issue #20958 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.3: WONTFIX, 3.4: DONE, 4.0: REQUIRED to 3.3: WONTFIX, 3.4: DONE, 4.0: DONE ruby_4_0 commit:137e40a9f7779e4a4fd9b06640b055cfab059dd5 merged revision(s) commit:239a472609db43bf8a5388c4c8da11b1a4b322f6, commit:d29afc8ab801ab3d32fcd787e43fbae7ea2630a6. ---------------------------------------- Bug #20958: fix ENV.keys encoding on windows https://bugs.ruby-lang.org/issues/20958#change-118999 * Author: YO4 (Yoshinao Muramatsu) * Status: Closed * Assignee: windows * Backport: 3.3: WONTFIX, 3.4: DONE, 4.0: DONE ---------------------------------------- [github PR#12368](https://github.com/ruby/ruby/pull/12368) ENV.keys elements contain UTF-8 byte sequences with locale encoding on Windows. ```
ruby -v -e "p ENV.keys.last; p ENV.keys.last.encoding; p ENV.keys.last.dup.force_encoding('utf-8')" ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x64-mingw-ucrt] "\x{E383}\x{86E3}\x{82B9}\x{E383}\x88" #<Encoding:Windows-31J> "テスト"
This patch changes the encoding of ENV.keys to utf-8 on Windows.
--
https://bugs.ruby-lang.org/
participants (4)
-
hsbt (Hiroshi SHIBATA) -
k0kubun (Takashi Kokubun) -
nagachika (Tomoyuki Chikanaga) -
YO4 (Yoshinao Muramatsu)