ruby-changes:25307
From: kou <ko1@a...>
Date: Sun, 28 Oct 2012 20:21:00 +0900 (JST)
Subject: [ruby-changes:25307] kou:r37359 (trunk): Revert r37358
kou 2012-10-28 20:20:45 +0900 (Sun, 28 Oct 2012) New Revision: 37359 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37359 Log: Revert r37358 * lib/rexml/source.rb (REXML::IOSource#initialize): Use encode("UTF-16XX") instead of UTF-16XX encoded byte string by hand. Modified files: trunk/ChangeLog trunk/lib/rexml/source.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 37358) +++ ChangeLog (revision 37359) @@ -1,9 +1,3 @@ -Sun Oct 28 19:54:43 2012 Kouhei Sutou <kou@c...> - - * lib/rexml/source.rb (REXML::IOSource#initialize): Use - encode("UTF-16XX") instead of UTF-16XX encoded byte string by - hand. - Sun Oct 28 19:12:11 2012 Tadayoshi Funaba <tadf@d...> * ext/date/date_parse.c (iso8601_{ext,bas}_time): should not match Index: lib/rexml/source.rb =================================================================== --- lib/rexml/source.rb (revision 37358) +++ lib/rexml/source.rb (revision 37359) @@ -149,9 +149,9 @@ if encoding self.encoding = encoding elsif str[0,2] == "\xfe\xff" - @line_break = ">".encode("UTF-16BE") + @line_break = "\000>" elsif str[0,2] == "\xff\xfe" - @line_break = ">".encode("UTF-16LE") + @line_break = ">\000" elsif str[0,2] == "\xef\xbb" str += @source.read(1) str = '' if (str[2,1] == "\xBF") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/