Dev-Cpp icon indicating copy to clipboard operation
Dev-Cpp copied to clipboard

Chinese output garbled

Open zhangfangyong opened this issue 4 years ago • 7 comments
trafficstars

When I try to output Chinese on the console, the display is garbled. image My windows version is win10 20H2.

zhangfangyong avatar Jan 13 '21 03:01 zhangfangyong

Check your encoding settings in Dev-Cpp and in windows console, possibly they doesn't match

AKonia avatar Jan 14 '21 09:01 AKonia

Add system(chcp 65001);(don't forget to include stdlib.h first) before you print any Chinese or you must change the coding to ANSI rather than UTF8. This can be done by opening the original file with notepad.exe and save it in ANSI. Don't click yes when Dev-Cpp asks you to save the source file in UTF8.

185264646 avatar Jan 15 '21 15:01 185264646

我也是中文输出乱码,不管用什么方法都没用。 I am also Chinese output garbled, no matter what method is used, it is useless.

2244583435 avatar Jan 23 '21 03:01 2244583435

编写的时候,中文也无法正常显示。 When writing, Chinese can't be displayed normally.

2244583435 avatar Jan 23 '21 03:01 2244583435

To display the Chinese on edit , the Front such as "新宋体" which support Chinese needs to be set on Edit display item To print the Chinese on the console, the source file need to set "ANSI" code

lianix avatar Jan 26 '21 01:01 lianix

程序对ANSI编码的支持很不好 The program has poor support for ANSI coding See Issue #126

ZhouJiatai avatar Feb 26 '21 01:02 ZhouJiatai

https://github.com/Embarcadero/Dev-Cpp/issues/140#issuecomment-860181236

This works for me

xumingkuan avatar Jul 10 '21 07:07 xumingkuan