Skip to content

Commit d4d0a3b

Browse files
committed
Encode keys too
1 parent df7a08c commit d4d0a3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/rapidjson/parser.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct RubyObjectHandler : public BaseReaderHandler<UTF8<>, RubyObjectHandler> {
4949

5050
bool Key(const char* str, SizeType length, bool copy) {
5151
#ifdef HAVE_RB_INTERNED_STR
52-
VALUE val = rb_interned_str(str, length);
52+
VALUE val = rb_enc_interned_str(str, length, rb_utf8_encoding());
5353
#else
5454
VALUE val = rb_str_new(str, length);
5555
#endif

0 commit comments

Comments
 (0)