java.sql.SQLException: Incorrect string value:

Chinese prompt for inserting MySQL database java.sql.SQLException : incorrect string value: error.

When solving this problem, it is not good to change the database code and table code to utf8.

Finally, we find that the collation of the field is Latin1_ swedish_ Ci, change it to utf8_ general_ Ci is OK.

View field code command: show full columns from tablename;

Change field command: alter table tablename modify column columnname varchar (100) character set utf8 collate utf8_ general_ ci not null;

Read More: