fix doulbe declared  function get_charset()