codeblocks使用中文出现illegal byte sequence/failure to convert GBK to UTF-8的解决方案

(1)在Edit->File ecoding中,选中以下两项
codeblocks使用中文出现illegal byte sequence/failure to convert GBK to UTF-8的解决方案

(2)

在Setting->Compiler settings->Global compiler settings->Other compiler options中,

输入以下两项:

-finput-charset=UTF-8
-fexec-charset=GBK

codeblocks使用中文出现illegal byte sequence/failure to convert GBK to UTF-8的解决方案

(3)之后可以正常使用中文,测试平台为win10,codeblocks版本为17.12

上一篇:jdk11+ spring5+ 报反射错误的屏蔽方法


下一篇:React 学习之路由HashRouter和BrowserRouter