当前位置:网站首页>Source insight garbled code solution
Source insight garbled code solution
2022-07-03 04:50:00 【llzhang_ fly】
【 reason 】:SI I won't support it UTF-8 Character coding garbled
Recently used source insight Check out some open source code , Chinese is garbled , because source insight I won't support it utf-8 code , The default encoding is ANSI code . So we need to utf-8 Such as the ANSI Code file conversion source insight Default supported ANSI Code format can display Chinese without garbled code .
【 problem 】
use Source Insight Open one C file , It contains Chinese in SI It's garbled in
【 To solve the process 】
1、 stay notePad++ Look at this file , yes UTF-8 Coded
2、 Try to make it display correctly UTF-8 Encoded Chinese characters :
find SI Explanation on the official website :
Source Insight 3.x Frequently Asked Questions
Q: Does Source Insight support UNICODE files?
A: Source Insight 3.x does not yet support UNICODE files.
namely SI 3.x actually , I won't support it Unicode
3、 take UTF-8 The source file , use Notepad++ take UTF-8 Convert the source file of to local ANSI, namely GB2312 code , here , Reuse SI open , You can display Chinese normally
For multiple files , Just want to make it display Chinese correctly , Here , For the time being, it can only be realized through code conversion .
About encoding conversion , In addition to using Notepad++ Tools such as , have access to iconv Tools to transform .
iconv The usage of is :
iconv -c -f utf-8 -t gb2312 BlogSohu_utf8.py >> BlogSohu_ansi_gb2312.py
【 Be careful 】 Because the code is Python Code , It is code sensitive , That is, it can't be arbitrarily converted to other codes , Otherwise, it will affect the execution of the code . Not to use SI Look at the code cool , But the Python The coding of the program has changed , Otherwise, the program cannot be executed normally , It's not worth it .
【 summary 】
Solution :
One 、 Single file conversion
For a single file , To say , As long as the non ANSI Code format file into ANSI Code format is ok , The method is as follows :
1、 The file with ultraEdit32 open , choice file -> transformation ->UTF-8 To ANSI, Then save . Reuse source insight Just open it .
Or use Notepad to open non ANSI Format of the source code file , Save as , In the save options dialog , It is found in the column of coding format that UTF-8, choice ANSI a , preservation , Reuse Source Insight Open it and you can normally display Chinese comments . For details, please refer to an article on Baidu experience :source insight The solution of Chinese random code .
2、 With the help of Linux Under the iconv command
(1) About iconv command reference , Can be in Linux Type iconv --help perhaps iconv --usage Check it out.
You can refer to this article :http://www.firekyrin.com/archives/249.html
You can use iconv Library function ( Included in glib in ) and iconv Command to perform encoding conversion , namely :
iconv -f utf-8 -t gb18030 file1.txt -o file2.txt
take utf-8 Coded file1.txt File conversion to gb18030 Coded file2.txt file .
source insight Chinese annotation for garbled code solution
(1)source insight read VC++ Source code , Comments are garbled solutions
1、options->preferences->Syntax Formatting->Styles;
2、 stay Style Name choice Comment, Again on its Font Name choice Pick, Then choose “ NSimSun ”.
(2)source insight read Linux Source code , Comments are garbled solutions
1、 Open source file with Notepad , Chinese can show , I save it as , In the Save option , The code column is :UTF-8. I chose ANSI a , preservation . Reuse Source Insight open , Finally, it can be shown .
边栏推荐
- 论文阅读_清华ERNIE
- Market status and development prospect prediction of global fermented plant protein industry in 2022
- Interface frequency limit access
- 2022 t elevator repair simulation examination question bank and t elevator repair simulation examination question bank
- Day 51 - tree problem
- Learning practice: comprehensive application of cycle and branch structure (I)
- AWS VPC
- Symbol of array element product of leetcode simple problem
- [XSS bypass - protection strategy] understand the protection strategy and better bypass
- 消息队列(MQ)介绍
猜你喜欢
论文阅读_清华ERNIE
JDBC database operation
The reason why the entity class in the database is changed into hump naming
论文阅读_中文NLP_ELECTRA
Number of uniform strings of leetcode simple problem
Retirement plan fails, 64 year old programmer starts work again
Leetcode simple question: the key with the longest key duration
ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
Introduction to JVM principle
Network security textual research recommendation
随机推荐
Keepalived热备与HAProxy
4 years of experience to interview test development, 10 minutes to end, ask too
SSM based campus part-time platform for College Students
Valentine's day limited withdrawal guide: for one in 200 million of you
Introduction to message queuing (MQ)
Market status and development prospect prediction of global colorimetric cup cover industry in 2022
General undergraduate college life pit avoidance Guide
并发操作-内存交互操作
On typescript and grammar
移动端——uniapp开发记录(公共请求request封装)
Golang -- realize file transfer
The reason why the entity class in the database is changed into hump naming
[BMZCTF-pwn] 18-RCTF-2017-Recho
2022 Shandong Province safety officer C certificate examination content and Shandong Province safety officer C certificate examination questions and analysis
论文阅读_中文NLP_ELECTRA
ZABBIX monitoring of lamp architecture (3): zabbix+mysql (to be continued)
[USACO 2009 Dec S]Music Notes
Handling record of electric skateboard detained by traffic police
AWS VPC
stm32逆向入门