Mysql CONCAT fields between char type and number type with JDBC

In the issue, if we concat a char field with Chinese characters and a number filed directly in JDBC’s sql query, the result returned by JDBC may lead Chinese words to be ‘blocked’ (which means the charset of the words is wrong). For some tries, the issue is due to the charset of number seems ISO-8859-1 but the charset of Chinese words are UTF8. And the solution is convert the words via cast function in SQL:

1
SELECT CONCAT( CHAR_FIELD, CAST( NUMBER_FIELD AS CHAR ) ) AS T ...

whereas the dispaly is correct. Enjoy it. 🙂