deal with character set of MySQL insert