标签:exception cep ble bsp set ring 编码 color var
普通的UTF8编码是不支持emoji表情插入的,会报异常:
Caused by: java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x92\xB0\xE5\x9C...‘ for column ‘name‘ at row 1
将表字段的编码单独改成utf8mb4,即可支持emoji表情的插入。
修改的sql语句为
mysql> alter table user modify column name varchar(255) character set utf8mb4;
标签:exception cep ble bsp set ring 编码 color var
原文地址:http://www.cnblogs.com/wenhui92/p/6951605.html