Fix issues for Charset and Query Sql