报错原因:使用数据表的字段编码为 latin1
image.png
解决方法
1.先进入要操作的数据库
image.png
2.然后先查看数据表编码
show create table alltemplateentity;
alltemplateentity是我的表名image.png
3.将存放中文字符的publisher字段编码修改为utf-8
alter table alltemplateentity change publisher publisher varchar(255) character set utf8;
image.png
结束。
可以再查一下数据表编码
image.png
修改数据表的编码(alltemplateentity表名)
alter table alltemplateentity character set utf8;