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

原文地址:https://www.cnblogs.com/ucprer/p/12871875.html