Dev-Cpp
Dev-Cpp copied to clipboard
About the problem that embacardero cannot display Chinese normally
When I open the cpp file containing Chinese content with embacardero, the following error occurs: Error info
Version : 6.3 Build Time : Jan. 31 2021 - 09:00 Message : No mapping for the Unicode character exists in the target multi-byte code page Address : 0x0014206D
Machine info
Platform : Windows NT OS version : 6.1 (build 7601) Service Pack : Service Pack 1 Computer Name : 2-STU30
Stack trace
There is nothing.
message
This is a big bug for Chinese students,iit brings us obstacles to learn c++ language. We hope the developer of the Embarcardero can importance and solve this bug. My English is not very good, so if there is any error, please forgive me。
Can you post an example file giving the error?
Okay
bellman-ford - 副本.txt If you convert the file suffix to (.cpp), you can find the problem. Thank you for your attention.
Yes, same problem for me. Seems that it is an issue associated with encoding. The dev C++ saved the file as ANSI instead of UTF8 even if I chose UFT8 at the saving stage.
I have the same issue, I set the new file format to ANSI, when I create a new cpp file, the format is ANSI. After I input some Chinese Characters, then save, it will save to utf8 format automatically, I need to manually save to ansi format to make sure the output correct. But when I open the file from local disk, it report the issue above.
I have a workaround for this issue, hopes it can help: Set the file format to UTF8, and aslo the new File format UTF8, add "-fexec-charset=gbk" in "compiler option"->"general"
Tools -> Editor Options -> New Document Encoding: UTF-8. And make sure the opened file is also using UTF-8.
Use this version: https://github.com/royqh1979/Dev-CPP
File ... saved as UTF-8
In Powershell IDE console window ...
In Win10 cmd command prompt ...
(Only one code page is correct, I think?)