Dev-Cpp
Dev-Cpp copied to clipboard
Chinese display error(汉字显示错误)
When I run my code with Chinese in it, it display it error.
I search for some issues, and I have tried to select NO when it ask me to save the file in UTF-8, but it do not work.
So how can I solve the problem
这是因为你编写的源文件是UTF-8编码, 但是命令提示符编码是GB936(中文编码), 所以会导致乱码. 新建文件的时候就可以选择文件的编码, 一般默认是ANSI, 保存的话也是
这是因为你编写的源文件是UTF-8编码, 但是命令提示符编码是GB936(中文编码), 所以会导致乱码. 新建文件的时候就可以选择文件的编码, 一般默认是ANSI, 保存的话也是
我选的就是ANSI,保存的时候格式显示的也是ANSI,现在就不知道怎么办了
Try to use Red Panda Dev Cpp
I met the same problem. If I use utf-8 to save the code, I can open it again, but it will output chinese characters wrongly. If I use ANSI to save the code, it can't be opened in Devcpp again. It sends me an error report. And the old version devcpp didn't have this error.
cmd下执行chcp 65001, 然后再执行程序(cmd下输入"没用.exe"执行)试试
My source file is utf-8, just use this compiler option, i can output hanzi in cmd。
在你的电脑上勾选:Beta版:使用Unicode UTF-8 提供全球语言支持。然后把devcpp的默认编码改成UTF-8,就没有问题了。
但是这么做,会导致你使用devcpp的中文语言页面全部乱码,如果英语过关,devcpp换成英语界面,这样用着比较舒服。 或许现在可能不需要了。两年多了。