Embarcadero / Dev-Cpp

A fast, portable, simple, and free C/C++ IDE
https://www.embarcadero.com/free-tools/dev-cpp
GNU General Public License v2.0
2.53k stars 276 forks source link

About the problem that embacardero cannot display Chinese normally #239

Open OIer-411963 opened 2 years ago

OIer-411963 commented 2 years ago

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。

pmcgee69 commented 2 years ago

Can you post an example file giving the error?

OIer-411963 commented 2 years ago

Okay

OIer-411963 commented 2 years ago

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

ZJsheep commented 2 years ago

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.

Ray23210 commented 2 years ago

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 commented 2 years ago

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"

Hecate2 commented 1 year ago

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

flopezre commented 1 year ago

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

pmcgee69 commented 1 year ago

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