解決:java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x92\x94‘ for column
出現原因:當insert資料中有表情時發生。而這些表情是按照4個位元組一個單位進行編碼的,而我們使用的utf-8編碼在mysql資料庫中預設是按照3個位元組一個單位進行編碼的.
解決方案:
在 mysql 中設定插入報錯欄位的字符集為 utf8mb4 即可。
參考連結:https://blog.csdn.net/qq_31122833/article/details/83992085
相關文章
- java.sql.SQLException: Incorrect string valueJavaSQLException
- MySQL ERROR 1366(HY000):Incorrect string value:''for column''at row 1解決方案MySqlError
- MySQL: Incorrect string value: '\xF0\xA4\xBD\x82'分析MySql
- MySQL 亂碼實戰解決ERROR 1366 (HY000): Incorrect string value: 'MySqlError
- 【MySQL】Incorrect string value 問題一則MySql
- MySQL-修改表的編碼和列的編碼-Incorrect string value: '\xE6\xB1\x9F\xE5\xAE\x81...' for column 'unitname' at rowMySql
- java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized...報錯解決JavaSQLExceptionServerZed
- mysql 報錯:ERROR 1366 (HY000): Incorrect string value: ‘\xD5\xC5\xC8\xFD‘ for column ‘name‘ at row 1MySqlError
- 【MySQL報錯】1366 - Incorrect string value: ‘\xE6\x80\xBB\xE7\xBB\x8F...‘ for column ‘name‘ at row 1MySql
- 解決 Incorrect datetime value: '0000-00-00 00:00:00' 報錯
- PHP連線SQL資料庫無法顯示emoji表情的解決辦法(變成問號、1366 Incorrect string value)PHPSQL資料庫
- Mybatis Data truncation: Truncated incorrect DOUBLE value: '*'MyBatis
- kettle建立資源庫Incorrect integer value
- java.sql.SQLException: The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents moreJavaSQLExceptionServerZed
- java.sql.SQLException: No value specified for parameter 1 異常分析JavaSQLException
- ORACLE匯出文字到MYSQL 報錯 Incorrect integer value: ''OracleMySql
- MySQL錯誤Incorrect file format解決方案薦MySqlORM
- 解決 eclipse 上 Keystore was tampered with, or password was incorrectEclipse
- duplicate ORA-01405: fetched column value is NULLNull
- mysql Unknown column ‘‘ in ‘field list‘解決方案MySql
- Incorrect key file for table '/tmp/....'錯誤的解決--記錄
- [20230303]sqlplus column new_value old_value.txtSQL
- mysql 主從同步 Error 'Out of range value for column的問題MySql主從同步Error
- Undefined property: stdClass::$column_name 怎麼解決?Undefined
- [20231103]sqlplus column new_value old_value.txtSQL
- 資料庫報錯java.sql.SQLException: Field ‘id‘ doesn‘t have a default value資料庫JavaSQLException
- ibatis resultMap引數填充異常:java.sql.SQLException: Column 'XXX' not found.BATJavaSQLException
- Idea資料庫引入異常:java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognizedIdea資料庫JavaSQLExceptionServerZed
- @AllArgsConstructor與@Value共用的問題解決Struct
- 錯誤解決:Attempting to use uninitialized value VariableZed
- MySQL資料庫index column size too large. the maximum column size is 767 bytes問題解決MySql資料庫Index
- mysql 1558 - Column count of mysql.proc is wrong 的解決MySql
- android 獲取string.xml中的valueAndroidXML
- Caused by: java.sql.SQLException: 無法轉換為內部表示解決方法JavaSQLException
- Hibernate 註解@Column(nullable = false) 和 @Column(unique=true)NullFalse
- 安裝mysql遇到ERROR: 1136 Column count doesn't match value count at row 1MySqlError
- java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2)的解決方法JavaSQLExceptionIndex
- java.sql.SQLException: ORA-00911: invalid character 解決方法(轉)JavaSQLException