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

About the problem that embacardero cannot display Chinese normally

Open OIer-411963 opened this issue 2 years ago • 9 comments

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。

OIer-411963 avatar Jul 18 '22 07:07 OIer-411963

Can you post an example file giving the error?

pmcgee69 avatar Jul 20 '22 17:07 pmcgee69

Okay

OIer-411963 avatar Jul 23 '22 04:07 OIer-411963

bellman-ford - 副本.txt If you convert the file suffix to (.cpp), you can find the problem. Thank you for your attention.

OIer-411963 avatar Jul 23 '22 04:07 OIer-411963

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.

ZJsheep avatar Jul 24 '22 00:07 ZJsheep

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.

Ray23210 avatar Sep 25 '22 13:09 Ray23210

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"

Ray23210 avatar Sep 25 '22 13:09 Ray23210

Tools -> Editor Options -> New Document Encoding: UTF-8. And make sure the opened file is also using UTF-8.

Hecate2 avatar Dec 05 '22 07:12 Hecate2

Use this version: https://github.com/royqh1979/Dev-CPP

flopezre avatar Dec 10 '22 05:12 flopezre

File ... saved as UTF-8

image

In Powershell IDE console window ...

image

In Win10 cmd command prompt ...

(Only one code page is correct, I think?)

image

pmcgee69 avatar Dec 14 '22 07:12 pmcgee69