global

def charset(str)

:nodoc:
def charset(str)
  md = str.to_s.match CHARSET_RE
  md && md[1].to_s.strip.gsub(/^"|"$/, "")
end