codeblocks17.12编码问题

文件编码:
settings -> editor -> general setting -> other setting ->encoding此处默认WINDOWS-936(即GBK)
编译编码: settings -> compiler -> global compiler settings -> other options在框中输入: -finput-charset=GBK -fexec-charset=GBK
第一个参数表示编译的时候输入文件的编码解释格式,第二参数表示生成的执行文件执行的时候显示用的编码格式。这些参数如果和实际不吻合,必然产生乱码。只要吻合,就不会乱码了。[1]

参考:https://blog.csdn.net/softman11/article/details/6121538
原文地址:https://www.cnblogs.com/stefango/p/9320545.html