class Nokogiri::HTML::Document

def meta_encoding= encoding

content tag, the encoding is not set.
Set the meta tag encoding for this document. If there is no meta
##
def meta_encoding= encoding
  meta = meta_content_type and
    meta['content'] = "text/html; charset=%s" % encoding
end