diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-17 16:29:39 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-17 16:29:39 +0000 |
commit | 4a7add1a7410bf3ab067bea3e4337ea78fe2f639 (patch) | |
tree | a073f817c6431b50142f1d5b560a4c9a955bcda4 /ext/psych | |
parent | cc8ed44f106c7b07d614a4963600b5e9716026fb (diff) |
* ext/psych/parser.c (transcode_string): fix encoding index names.
Thanks markizko for reporting.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/psych/parser.c b/ext/psych/parser.c index 6f4c4569e9..0908a1b49f 100644 --- a/ext/psych/parser.c +++ b/ext/psych/parser.c @@ -79,8 +79,8 @@ static VALUE make_exception(yaml_parser_t * parser, VALUE path) static VALUE transcode_string(VALUE src, int * parser_encoding) { int utf8 = rb_utf8_encindex(); - int utf16le = rb_enc_find_index("UTF16_LE"); - int utf16be = rb_enc_find_index("UTF16_BE"); + int utf16le = rb_enc_find_index("UTF-16LE"); + int utf16be = rb_enc_find_index("UTF-16BE"); int source_encoding = rb_enc_get_index(src); if (source_encoding == utf8) { |