When using nutz to insert Chinese data into the mysql database today, I found that what is stored in the database table? ? Garbled? For me, who has been doing web development all the year round, this is a piece of cake. Come on, try the method first?
1. First, set the character encoding on the page to UTF-8, no;
Second, write a Filter filter, no;
3. Set the database encoding to UTF-8 or GBK, or not;
I crossed the circle, Baidu, and found that utf-8 should be added after the database connection, jdbc:mysql://127.0.0.1:3306/databaseName?characterEncoding=UTF-8, it is actually good, and it is the same as sqlserver and oracle are different!