4537 views|9 replies

97

Posts

0

Resources
The OP
 

Notepad++ displays Chinese characters normally, but keil4 and source insight4 display garbled characters? [Copy link]

Notepad++ displays Chinese characters normally, as shown in Figure 1;
but keil4 and source insight4 display garbled characters, as shown in Figures 2 and 3.

Vice versa:
keil4 and source insight4 display Chinese normally, while notepad++ displays garbled characters.

I would like to ask:
What is going on and how can I solve it?

Thanks!

Figure 1


Figure 2


Figure 3

This post is from MCU

Latest reply

I haven't used Keil for a long time, but I can learn from the experience of other software. I used quartus 13.0 before and found the problem you mentioned. I used np++ to add Chinese comments, but the built-in editor displayed garbled characters, and vice versa.... Suggested solution: 1. After upgrading to 16.0, when creating a new document, no garbled characters will appear when changing either side. This should be because the official has fixed the bug, so try the new version of the software; 2. If there is a version that can be displayed normally, try to select all and copy, create a new file and paste and save to replace. Sometimes the file is inherited, and the old version may have problems when opening the new version.   Details Published on 2020-1-31 15:40
 

664

Posts

104

Resources
2
 

File encoding problem. I don't know what encoding your file is in, so I can't solve the problem. Please upload your file

This post is from MCU

Comments

Thank you! See the attachment. When I opened it again, notepad++ was also garbled. See the attached picture. Attached picture [attachimg]457486[/attachimg]  Details Published on 2020-1-28 15:55
 
 

97

Posts

0

Resources
3
 
gs001588 posted on 2020-1-28 15:18 File encoding problem. I don't know what encoding your file is in, so I can't solve it. Please upload the file

Thanks!

See attachment

When I opened it again, notepad++ was also garbled , see the attached picture

appendix

[attach]457479[/attach

]

F580_UART0_STDIO.rar

2.44 KB, downloads: 1

This post is from MCU
 
 
 

1w

Posts

25

Resources
4
 

Now try to use utf8 encoding, which can avoid most garbled problems

This post is from MCU

Comments

Thanks to the moderator! The encoding is UTF-8 without BOM format, but it is still garbled. [attachimg]457490[/attachimg]  Details Published on 2020-1-28 16:45
 
 
 

97

Posts

0

Resources
5
 
dcexpert posted on 2020-1-28 15:59 Now try to use utf8 encoding, which can avoid most garbled code problems

Thank you moderator!

The encoding is UTF-8 without BOM format, but it is still garbled.

This post is from MCU

Comments

Some software does not use utf8 encoding by default, and the files may become garbled after being saved.  Details Published on 2020-1-28 19:12
 
 
 

1w

Posts

25

Resources
6
 
yhyworld posted on 2020-1-28 16:45 Thank you moderator! The encoding is UTF-8 without BOM format encoding, but it is still garbled.

Some software does not use utf8 encoding by default, and the files may become garbled after being saved.

This post is from MCU
 
 
 

7422

Posts

2

Resources
7
 
It is very likely that you saved the file using Keil or si, which caused np++ to not display it correctly. You should screenshot the entire np++ interface. The encoding format of the current file is displayed in the lower right corner. . . What can you save by cutting half of the picture?
This post is from MCU

Comments

Thank you! See the attached picture for the full picture. I also found this rule: using multiple editors to edit and save will result in garbled characters. If you only use one editor to edit and save, at least in this editor, there will be no garbled characters. But how can I  Details Published on 2020-1-29 10:25
 
 
 

97

Posts

0

Resources
8
 
freebsder posted on 2020-1-28 22:00 It is very likely that you saved the file using Keil or si, which caused np++ to not display correctly. You should take a screenshot of the entire np++ interface, the lower right corner...

Thank you God!

See attached picture for full picture

I also found this pattern:

Editing and saving with multiple editors will result in garbled characters.

If you only use one editor to edit and save, at least the text in this editor will not be garbled.

But how can we edit and save with multiple editors without garbled characters?

Please give me some advice!

This post is from MCU
 
 
 

7422

Posts

2

Resources
9
 
Look at the encoding of the Chinese characters displayed by np++ in your first post. Take the encoding displayed normally as the benchmark. One way is to save all files in one encoding format. The specific format depends on your peripherals. If you don't need things like gb2312 LCD, you can save them all in utf8. Also check your keil and si to see their default character encodings. Make sure they are utf8 (or gbk, gbk is a superset of gb2312). Don't use options like system default. If not necessary, utf8 is recommended. The default adaptability is stronger than gbk.
This post is from MCU
 
 
 

1658

Posts

1

Resources
10
 

I haven't used Keil for a long time, but I can learn from the experience of other software.

I used quartus 13.0 before and found the problem you mentioned. I used np++ to add Chinese comments, but the built-in editor displayed garbled characters, and vice versa....

Suggested solution:

1. After upgrading to 16.0, when creating a new document, no garbled characters will appear when changing either side. This should be because the official has fixed the bug, so try the new version of the software;

2. If there is a version that can be displayed normally, try to select all and copy, create a new file and paste and save to replace. Sometimes the file is inherited, and the old version may have problems when opening the new version.

This post is from MCU
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list