mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rexml/output.rb (REXML::Output): Don't output BOM in middle
of the output string. * test/rexml/test_document.rb: Add a test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
15a743b3ff
commit
ac9a8ac624
3 changed files with 30 additions and 0 deletions
|
@ -11,6 +11,11 @@ module REXML
|
|||
self.encoding = encd
|
||||
|
||||
@to_utf = encd != 'UTF-8'
|
||||
|
||||
if encoding == "UTF-16"
|
||||
@output << "\ufeff".encode("UTF-16BE")
|
||||
self.encoding = "UTF-16BE"
|
||||
end
|
||||
end
|
||||
|
||||
def <<( content )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue