Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* ext/psych/parser.c (transcode_string): fix encoding index names.

  Thanks markizko for reporting.
  • Loading branch information...
commit 0845b0781abeac81132594c5cebf2630cb18933d 1 parent 620fc6d
@tenderlove authored
Showing with 7 additions and 2 deletions.
  1. +5 −0 CHANGELOG.rdoc
  2. +2 −2 ext/psych/parser.c
View
5 CHANGELOG.rdoc
@@ -1,3 +1,8 @@
+Fri May 18 01:28:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/parser.c (transcode_string): fix encoding index names.
+ Thanks markizko for reporting.
+
Wed May 16 05:11:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string
View
4 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) {
Please sign in to comment.
Something went wrong with that request. Please try again.