Skip to content

Commit 239a472

Browse files
YO4hsbt
authored andcommitted
fix ENV.keys encoding on windows
Fix the encoding of ENV.keys elements to UTF-8 on windows. They contain UTF-8 byte sequences with locale encoding.
1 parent f5fb2ab commit 239a472

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5731,7 +5731,7 @@ env_aset(VALUE nm, VALUE val)
57315731
static VALUE
57325732
env_keys(int raw)
57335733
{
5734-
rb_encoding *enc = raw ? 0 : rb_locale_encoding();
5734+
rb_encoding *enc = raw ? 0 : env_encoding();
57355735
VALUE ary = rb_ary_new();
57365736

57375737
ENV_LOCKING() {

0 commit comments

Comments
 (0)