class Nokogiri::HTML::Document::EncodingReader::SAXHandler
:nodoc:
:nodoc:
def initialize
def initialize @encoding = nil super() end
def start_element(name, attrs = [])
def start_element(name, attrs = []) return unless name == 'meta' attr = Hash[attrs] charset = attr['charset'] and @encoding = charset http_equiv = attr['http-equiv'] and http_equiv.match(/\AContent-Type\z/i) and content = attr['content'] and m = content.match(/;\s*charset\s*=\s*([\w-]+)/) and @encoding = m[1] end