class REXML::IOSource

def encoding_updated

def encoding_updated
  case @encoding
  when "UTF-16BE", "UTF-16LE"
    @source.binmode
    @source.set_encoding(@encoding, @encoding)
  end
  @line_break = encode(">")
  @pending_buffer, @scanner.string = @scanner.rest, ""
  @pending_buffer.force_encoding(@encoding)
  super
end