method
encoding_updated
v2_5_5 -
Show latest stable
- Class:
REXML::IOSource
encoding_updated()private
No documentation available.
# File lib/rexml/source.rb, line 284
def encoding_updated
case @encoding
when "UTF-16BE", "UTF-16LE"
@source.binmode
@source.set_encoding(@encoding, @encoding)
end
@line_break = encode(">")
@pending_buffer, @buffer = @buffer, ""
@pending_buffer.force_encoding(@encoding)
super
end