class Nokogiri::HTML4::Document
def meta_encoding
Get the meta tag encoding for this document. If there is no meta tag,
##
def meta_encoding if (meta = at_xpath("//meta[@charset]")) meta[:charset] elsif (meta = meta_content_type) meta["content"][/charset\s*=\s*([\w-]+)/i, 1] end end