The reason why MySQL is garbled is that there are several reasons:
1, stored in the database before the garbled
2, stored in the database process garbled
3, stored in the database after garbled
Want to know where the garbled is very simple, in the background to print a bit to know.
Now that you know where the problem is, the solution is simple:
1, JSP set code is UTF-8, to ensure that the background is UTF-8 encoding
2. Add this section of Jdbc:mysql://localhost:3306/test to the database connection? Useunicode=true&characterencoding=utf-8, ensure that the transmission process is utf-8.
3, set the database encoding for Utf-8, in the My.ini settings or in config set also line, note is My.ini default-character-set to change two places
4, URL or Easyui garbled, you can try to server.xml Tomcat in the
<connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443"/>
Switch
<connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443" URIEncoding= " Utf-8 "/>
To ensure that not garbled, the first thing to do is to unify the code, other problems are easy to find out. Finish.
Several reasons for MySQL garbled