用codeblocks编译文件,某些文件能编译成功,并且中文不乱码,但是有一些项目虽然编译也成功,但是在窗口里面中文变成了乱码,求大牛指点解决方法!急,在线等
黄舟2017-04-17 11:43:41
You can try setting the encoding format. Garbled Chinese characters are usually caused by incorrect encoding format. Chinese characters are encoded in gbk
. You can set it to utf-8
encoding and try
阿神2017-04-17 11:43:41
I have also been struggling with this problem. If I compile it correctly on cb, it will be garbled on vs. If I compile it correctly on vs, it will be garbled on CB. Even changing the format doesn't work. . . English is used directly afterwards
黄舟2017-04-17 11:43:41
codeblocks is saved as local win code by default
The default processing file of mingw-gcc is UTF-8. Add -finput-charset=charset
to the gcc compilation option.
charset is the encoding you use, such as -finput-charset=GBK
This can be said to be a compiler problem and has nothing to do with codeblocks. . .
As long as the encoding is unified, there will be no mistakes