fix bugs in repo_mysql caused by charset