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:
- Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNot
- Cause: java.sql.SQLException: invalid column type: 1111 Error [How to Fix]
- java.sql.SQLException : IO error: socket read timed out!
- SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error] with root
- Error: globalconfigutils setmetadata fail! Cause:java.sql.SQLException…
- java.sql.SQLException: The Network Adapter could not establish the connection
- java.sql.SQLException : IO exception: socket read timed out
- Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0
- Error code 1045, state 28000, Java sql.SQLException :Access denied for user ‘root’@’localhost’
- 1067 – Invalid default value for ‘sex‘1366 – Incorrect string value: ‘\xE6\x8A\x80\xE6\x9C\xAF…‘ f
- Mybatis database error java.sql.SQLException : Error setting driver on UnpooledDataSource. Caus
- Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the
- SQL Error (3621): String or binary data would be truncated The statement has been terminated. */
- Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
- [Solved] Flowable Start Error: ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- A repeated string is composed of two identical strings. For example, abcabc is a repeated string with length of 6, while abcba does not have a duplicate string. Given any string, please help Xiaoqiang find the longest repeated substring.
- Cause: java.sql.BatchUpdateException: Unknown column ‘xxx‘ in ‘field list‘
- Java String.split () special character processing
- Java encrypts the string with MD5