当前位置:网站首页>Batch modify the txt file code to UTF-8 (notepad++)
Batch modify the txt file code to UTF-8 (notepad++)
2022-07-05 07:37:00 【HAGUU】
Please like it , thank you ~Thanks*(・ω・)ノ
After two days of practice , Succeed in putting txt File from the ASCI turn UTF-8 And there is no garbled code in the text , The general steps are as follows :
- The computer has python( Previously installed ,windows Generally there are )
- Notepad++, plug-in unit - Plug-in management - install python script
- python script newly build script, Script name customization ( Such as :convertUtf8.py)
The script code is as follows :
import os;
import sys;
filePathSrc="C:\\decompile\\" # Path to the folder with files to convert
for root, dirs, files in os.walk(filePathSrc):
for fn in files: if fn[-4:] == '.htm': # Specify type of the files
notepad.open(root + "\\" + fn)
notepad.runMenuCommand("Encoding", "Convert to UTF-8") notepad.save()
notepad.close()
Related articles : The source of the above code
4. The first 3 Step by step .py The file in notepad++ open ( Such as :convertUtf8.py)
5. stay notepad++ Execute the script
Related articles : Method of execution
6. The first 5 After executing step plug-in unit -python script-scripts A new action bar is generated under “convertUtf8”
relevant :
. If you want to go from scripts Delete the script under the column , Then open the location where the script is saved , Delete file , restart notepad++ that will do
. If you want to edit this script , Press and hold ctrl And click the operation bar
7. To be transferred txt Put the file in the 3 Under the folder path mentioned in the script
8. Notepad++ Open... In 7 All the encoded documents to be transferred in step
9. Click on : plug-in unit -python script-scripts-convertUtf8
The first 9 After step execution, the file starts from notepad++ Automatically close , Code conversion succeeded .
边栏推荐
- NSIS search folder
- Idea common settings
- Logistic regression: the most basic neural network
- Database SQL practice 4. Find the last of employees in all assigned departments_ Name and first_ name
- What if the DataGrid cannot see the table after connecting to the database
- Apple system shortcut key usage
- How to deal with excessive memory occupation of idea and Google browser
- With the help of Navicat for MySQL software, the data of a database table in different or the same database link is copied to another database table
- Charles- unable to grab bags and surf the Internet
- What is deep learning?
猜你喜欢
And play the little chestnut of dynamic agent
What is Bezier curve? How to draw third-order Bezier curve with canvas?
CADD课程学习(5)-- 构建靶点已知的化合结构(ChemDraw)
Ue5 hot update - remote server automatic download and version detection (simplehotupdate)
Rough notes of C language (2) -- constants
HDU1232 畅通工程(并查集)
MySql——存储引擎
The number of occurrences of numbers in the offer 56 array (XOR)
Shadowless cloud desktop - online computer
[neo4j] common operations of neo4j cypher and py2neo
随机推荐
Eclipse project recompile, clear cache
P3D gauge size problem
Esmini longspeedaction modification
NPM and package common commands
I 用c I 实现队列
Daily Practice:Codeforces Round #794 (Div. 2)(A~D)
Deepin, help ('command ') output saved to file
Pagoda create multiple sites with one server
Oracle code use
What does soda ash do?
Typecho adds Baidu collection (automatic API submission plug-in and crawler protocol)
Install deeptools in CONDA mode
Apple system shortcut key usage
Simple operation of nixie tube (keil5)
arcpy. SpatialJoin_ Analysis spatial connection analysis
Database SQL practice 4. Find the last of employees in all assigned departments_ Name and first_ name
editplus
Rough notes of C language (2) -- constants
arcgis_ spatialjoin
氫氧化鈉是什麼?