调试的时候出现了中文乱码 形如 “口口”,

然后先看数据库,mysql这边的确出现了中文乱码
设置字符集
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8```
mysql client 端能够正常显示

但是idea还是有这个问题。估计是idea配置有关。查看以后全部都配置成utf8.仍然有这个问题。。。参照网上
在Run/Debug Configuration里面添加-Dfile-encoding=UTF-8

还是不行,我都打算重装了。
然后看见网上说可能是Font的问题。

好了,终于出来了,好家伙

网友评论