From f774c96beb1fd61720b335b1b7b54cf9422a6f2d Mon Sep 17 00:00:00 2001 From: kou Date: Sun, 28 Oct 2012 11:20:45 +0000 Subject: Revert r37358 * lib/rexml/source.rb (REXML::IOSource#initialize): Use encode("UTF-16XX") instead of UTF-16XX encoded byte string by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/source.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rexml/source.rb') diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb index 46c2fc79cd..112393cfd4 100644 --- a/lib/rexml/source.rb +++ b/lib/rexml/source.rb @@ -149,9 +149,9 @@ module REXML 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") -- cgit v1.2.3