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

(1)在Edit->File ecoding中,选中以下两项

(2)

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

输入以下两项:

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

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

posted @ 2020-05-11 20:56  UCPRER  阅读(2578)  评论(0编辑  收藏  举报