在codeblocks里面出现converting to execution character set illegal sequence的问题

  用codeBlocks写代码时,编译时出现错误提示:
"error:converting to execution character set illegal sequence".

   参考了网上的解答后发现,主要原因是因为MinGW是从linux下移植过来的,而linux以utf-8为
内码,windows是以utf-16为内码的。移植过来的程序也就不可避免地
会出现一些问题。这个问题主要出现在源程序中出现汉字的时候,由于
不能正确处理内码而致。
   在codeblocks中只需将源文件, 格式设成utf-8就可以了 ,setting->compiler and debugger setting
->other options 填写-finput-charset=utf-8


原文链接:https://blog.csdn.net/sc9018181134/article/details/46400775/

猜你喜欢

转载自blog.csdn.net/nyist_yangguang/article/details/114453003