eson15 / Blog

基于Springmvc+MyBatis+Spring+Bootstrap+EasyUI+Mysql的个人博客系统项目源码
471 stars 230 forks source link

编码不是用的utf-8吗 #9

Open luckyhua opened 7 years ago

luckyhua commented 7 years ago

为什么我用idea导入之后全是乱码,jsp正常,我项目编码都设置的utf-8

peng-xin commented 7 years ago

jsp内容乱码?

luckyhua commented 7 years ago
jsp正常,java代码中文乱码
luckyhua commented 7 years ago

` /**

peng-xin commented 7 years ago

我感觉你换下gbk应该就不乱码了

luckyhua commented 7 years ago

换了一样

luckyhua commented 7 years ago

全问号了

peng-xin commented 7 years ago

他java文件的编码方式是GBK的

peng-xin commented 7 years ago

写的时候可能就不统一,你现在要改的话估计也麻烦

luckyhua commented 7 years ago

是的,我刚把项目的编码改过GB2312,就全问号了,sql语句中文也是,我就自己到这里copy了一份

peng-xin commented 7 years ago

是GBK,不是GB2312,你换成GBK就都正常了

luckyhua commented 7 years ago

GBK可以

luckyhua commented 7 years ago

有点麻烦

sunmingshuai commented 6 years ago

是啊 怎么还有这种问题... 竟然不是utf-8.... 瞬间不想看了