diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/json/ext/parser/parser.c | 2 | ||||
-rw-r--r-- | ext/json/ext/parser/parser.rl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index 592e729..4ac0c87 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -1608,7 +1608,7 @@ static VALUE convert_encoding(VALUE source) FORCE_UTF8(source); } } else { - source = rb_str_conv_enc(source, NULL, rb_utf8_encoding()); + source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding()); } } #else diff --git a/ext/json/ext/parser/parser.rl b/ext/json/ext/parser/parser.rl index 2fa0cae..4fee7ed 100644 --- a/ext/json/ext/parser/parser.rl +++ b/ext/json/ext/parser/parser.rl @@ -592,7 +592,7 @@ static VALUE convert_encoding(VALUE source) FORCE_UTF8(source); } } else { - source = rb_str_conv_enc(source, NULL, rb_utf8_encoding()); + source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding()); } } #else |