ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:120277] [Ruby master Bug#20958] fix ENV.keys encoding on windows
@ 2024-12-17 12:32 YO4 (Yoshinao Muramatsu) via ruby-core
  0 siblings, 0 replies; only message in thread
From: YO4 (Yoshinao Muramatsu) via ruby-core @ 2024-12-17 12:32 UTC (permalink / raw)
  To: ruby-core; +Cc: YO4 (Yoshinao Muramatsu)

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/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-17 12:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-17 12:32 [ruby-core:120277] [Ruby master Bug#20958] fix ENV.keys encoding on windows YO4 (Yoshinao Muramatsu) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).