From 4a7add1a7410bf3ab067bea3e4337ea78fe2f639 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Thu, 17 May 2012 16:29:39 +0000 Subject: * 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 --- ext/psych/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/psych') 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) { -- cgit v1.2.3