Stumbled across this problem and recorded that issues related to coding and database character sets have been cumbersome.
?? This emoji character reported an error in the repository: incorrect string value: ' \xf0\x9f\x91\x8d 2 ... ' for column ' Mark ' at row 1
The solution is as follows:
utf-8 encoding can be two, three, four bytes, emoji emoticons or some special characters are 4 bytes, and MySQL UTF8 encoding up to 3 bytes, so data is not plugged in. My solution is this 1. Locate the My.ini in the MySQL installation directory and make the following changes: [Mysqld]character-set-server= Utf8mb4[mysql]default-character-Set=utf8mb4 modified after restarting MySQL2 set utf8mb4 collate utf8mb4_bin; (Replace table_name with your table name)
The development environment uses NAVICAT, so it is possible to modify the character set to UTF8MB4 directly.
Reference: http://blog.csdn.net/likendsl/article/details/7530979
Emoji Write Database error: "Incorrect string value: ' \xf0\x9f\x91\x8d 2 ... ' for column ' Mark ' at row 1" solution