当前位置:网站首页>GBK code in idea is converted to UTF-8 format ctrl+c+v one second solution perfect solution for single code file escape
GBK code in idea is converted to UTF-8 format ctrl+c+v one second solution perfect solution for single code file escape
2022-07-24 07:38:00 【DrMaker】

First step : If a file uses GBK code , stay idea Pass through UTF-8 The way to load the file , There will be chaos . It can be used at this time : Through the first reload Change the encoding format to GBK, At this time, the files you see are no longer garbled ; If you want the document to use UTF-8 code , Then through convert Change the file to UTF-8.( At this time, the byte stream of the file has changed )
The second step : Using shortcut keys Ctrl+a Select the entire file code ; Reuse Ctrl+c Copy the entire code file ; Then press ← Delete the contents of the entire folder 

The third step : This is the time to find idea The coding method in the lower right corner ,GBK The code here should show GBK Click to appear and select the coding method as UTF-8; Because the folder content is null at this time, it can be directly escaped ; There will be no garbled code ; Press... Again at this time Ctrl+V Paste the code copied to the clipboard ; At this point, the file code format is converted to UTF-8 file ;
UTF-8 and GBK difference :
1. GBK The text encoding of is represented by double bytes , That is to say, regardless of 、 English characters are represented by double bytes , Just to distinguish Chinese , Set the highest order as 1.
2. UTF-8 Encoding is a multi byte encoding for international characters , It uses English 8 position ( A byte ), Use of Chinese 24 position ( Three bytes ) Encoding . For forums with more English characters, use UTF-8 Save a space .
So for the same Chinese file , If you use GBK, It takes up more space than UTF-8 Be smaller . The size relationship is :1.5 * GBK = UTF-8.
边栏推荐
- Win10 sound icon has no sound
- Laplace distribution
- 【Pytorch】conv2d torchvision.transforms
- 剑指offer专项突击版第8天
- C language advanced part II Pointer
- 【信息系统项目管理师】第七章 复盘成本管理知识架构
- Sense dimension design responsive layout
- Opencascade notes: GP package
- DOM operation of JS -- style operation
- System integration project management engineer (soft test intermediate) key knowledge, recitation version
猜你喜欢

Selenium basic knowledge multi window processing

Vulnhub DC1

XSS漏洞学习

Oauth2==sso three protocols. Oauth2 four modes

C language advanced part VII. Program compilation and preprocessing

项目中数据库插入大批量数据遇到的问题

Requests crawl page source code data
![[steering wheel] code review ability of idea to ensure code quality](/img/70/dec438ba57f9cbd5020bba5da652ba.png)
[steering wheel] code review ability of idea to ensure code quality

深度学习二三事-回顾那些经典卷积神经网络

Influxdb未授权访问&CouchDB权限绕过
随机推荐
Injectfix principle learning (to realize the heat of repair addition)
【HiFlow】腾讯云HiFlow场景连接器实现校园信息管理智能化
Generate API documents using swagger2markup
游戏三子棋
Notes on the basics of using parameters in libsvm (1)
UNI-APP_小程序或h5页面背景音乐的播放与暂停
Jenkins 详细部署
Game three piece chess
Introduction to C language I. branch and loop statements
2022-07-23:给定N件物品,每个物品有重量(w[i])、有价值(v[i]), 只能最多选两件商品,重量不超过bag,返回价值最大能是多少? N <= 10^5, w[i] <= 10^5, v
Requests crawl page source code data
Problems encountered in inserting large quantities of data into the database in the project
Using depth and normal textures in unity
Deep analysis of data storage in memory
C language advanced part III. string functions and memory operation functions
Selenium basic knowledge debugging method
MITRE ATT&CK超详细学习笔记-02(大量案例)
Mutual implementation of stack and queue (c)
C language to achieve mine sweeping game
Advanced part of C language IV. detailed explanation of user-defined types