SQLException: Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...'

时间:2022-03-24 10:42:01

字符超范围了

msg.replaceAll("[\\ud800\\udc00-\\udbff\\udfff\\ud800-\\udfff]", "");
改数据库类型为utf8mb4

http://blog.csdn.net/fuxuejun/article/details/20361669点击打开链接

http://blog.csdn.net/ahuyangdong/article/details/50739549点击打开链接

解决:

http://www.cnblogs.com/nick-huang/p/5507262.html点击打开链接