Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x8C\x9D\xE2\x80...' for column 'machine_result' at row 1
Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x8C\x9D\xE2\x80...' for column 'machine_result' at row 1
线上遇到个问题,原因:
mysql中规定utf8字符MaxLen=3,但是某些unicode字符转成utf8编码之后有4个字节,于是就杯具了
mysql 5.3以后有utf8mb4这个编码,可以解决