解決: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: Incorrect string value: '\xF0\xA4\xBD\x82'分析MySql
- 【BUG記錄】MySQL插入Emoji表情報錯"Incorrect string value"MySql
- 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' 報錯
- java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized...報錯解決JavaSQLExceptionServerZed
- PHP連線SQL資料庫無法顯示emoji表情的解決辦法(變成問號、1366 Incorrect string value)PHPSQL資料庫
- [20231103]sqlplus column new_value old_value.txtSQL
- [20230303]sqlplus column new_value old_value.txtSQL
- java.sql.SQLException: No value specified for parameter 1 異常分析JavaSQLException
- java.sql.SQLException: The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents moreJavaSQLExceptionServerZed
- mysql Unknown column ‘‘ in ‘field list‘解決方案MySql
- java.sql.BatchUpdateException: Date truncation: Out of range value for column xxxxxJavaSQLBATException
- Undefined property: stdClass::$column_name 怎麼解決?Undefined
- Convert DataFrame string complex i to j python // “Cloning” row or column vectorsPython
- Idea資料庫引入異常:java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognizedIdea資料庫JavaSQLExceptionServerZed
- 資料庫報錯java.sql.SQLException: Field ‘id‘ doesn‘t have a default value資料庫JavaSQLException
- @AllArgsConstructor與@Value共用的問題解決Struct
- 錯誤解決:Attempting to use uninitialized value VariableZed
- MySQL資料庫index column size too large. the maximum column size is 767 bytes問題解決MySql資料庫Index
- StringRedisTemplate操作Redis時拋: Unexpected token (VALUE_STRING)Redis
- 【問題解決】remote: parse error: Invalid numeric literal at line 1, column 20,解決思路REMError
- ORA-12899: value too large for column ORG_NAME (actual: 145, maximum: 128)
- Caused by: org.apache.parquet.io.ParquetDecodingException: Can‘t read value in column [result, labelApacheException
- Mysql:Variable 'XXXt' can't be set to the value of 'NULL'解決MySqlNull
- CF708D Incorrect Flow 題解
- CentOS 搭建FTP伺服器(530 Login incorrect問題解決方法之一)CentOSFTP伺服器
- 解決一個小坑:error on line 1 at column 1: Document is emptyError
- 解決:java.lang.IllegalArgumentException: String must not be emptyJavaException
- Java原始碼閱讀-String中的private final char value[];Java原始碼
- Flutter 之 Row、Column詳解Flutter
- SourceTreet提交時顯示remote: Incorrect username or password ( access token )(4種解決辦法)REM
- java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2)的解決方法JavaSQLExceptionIndex
- SyntaxError: EOL while scanning string literal錯誤解決ErrorWhile
- idea:如果String 跟System該怎麼解決Idea
- pymysql.err.OperationalError: (1136, “Column count doesn‘t match value count at row 1“)報錯反省。MySqlError
- JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from StringJSONErrorJavaLDA