mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rexml/source.rb (REXML::Source::encoding): should not
convert the body twice. [ruby-core:08828] * lib/rexml/encoding.rb (REXML::Encoding::encoding): Encoding#encoding= to return boolean value to tell if the body is really converted or not. * lib/rexml/encoding.rb (REXML::Encoding::encoding): Specific conversion library (e.g. rexml/encodings/UTF-16.rb) to have higher preceding. * lib/rexml/encodings/UTF-16.rb (REXML::Encoding::decode_utf16): UTF-16#decode_utf16 should work strings without BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
390b340d52
commit
f2ad09d5b7
4 changed files with 35 additions and 16 deletions
|
@ -44,7 +44,7 @@ module REXML
|
|||
# Inherited from Encoding
|
||||
# Overridden to support optimized en/decoding
|
||||
def encoding=(enc)
|
||||
super
|
||||
return unless super
|
||||
@line_break = encode( '>' )
|
||||
if enc != UTF_8
|
||||
@buffer = decode(@buffer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue