Garbled problem, the fundamental reason is that the code is not unified, since the reload database, the project is no Chinese garbled, so the problem must appear in the database code.
After running MySQL, enter the following command
Show variables like ' character% ';
The author's query results are as follows:
Among them, character_set_client client coding mode;
Character_set_connection the encoding used to establish the connection;
Coding of character_set_database database;
Character_set_results the result set encoding;
Character_set_server the database server code;
As long as the above four to ensure that the same encoding, there will be no garbled problem. It can be seen that the author's database will appear coding problems. The solution is also simple, and add this to the database connection profile for each project.
Jdbc:mysql://localhost:3306/databasename?useunicode=true&characterencoding=utf-8
Or
Jdbc:mysql://localhost:3306/databasename?useunicode=true&characterencoding=utf-8
You can choose one of them based on different XML parsing tools.