当前位置:网站首页>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 .
边栏推荐
- Don't confuse the use difference between series / and / *
- Play with grpc - go deep into concepts and principles
- editplus
- 行测--资料分析--fb--高照老师
- UNIX commands often used in work
- CADD course learning (6) -- obtain the existing virtual compound library (drugbank, zinc)
- Butterfly theme beautification - Page frosted glass effect
- Hdu1232 unimpeded project (and collection)
- Microservice registry Nacos introduction
- Efficiency difference: the add method used by the set directly and the add method used by the set after judgment
猜你喜欢

II Simple NSIS installation package

Shadowless cloud desktop - online computer

Word import literature -mendeley

行测--资料分析--fb--高照老师

arcgis_ spatialjoin

Clickhouse database installation deployment and remote IP access

数字孪生实际应用案例-风机篇

Differences between pycharm and idle and process -- join() in vs Code

611. Number of effective triangles

Detailed explanation of miracast Technology (I): Wi Fi display
随机推荐
Microservice registry Nacos introduction
What is deep learning?
How to delete the virus of inserting USB flash disk copy of shortcut to
Efficiency difference: the add method used by the set directly and the add method used by the set after judgment
Today, share the wonderful and beautiful theme of idea + website address
Matrix and TMB package version issues in R
Batch convert txt to excel format
Idea shortcut key
DataGrid offline installation of database driver
Logistic regression: the most basic neural network
The number of occurrences of numbers in the offer 56 array (XOR)
static的作用
CADD course learning (5) -- Construction of chemosynthesis structure with known target (ChemDraw)
The golang timer uses the stepped pit: the timer is executed once a day
Altimeter data knowledge point 2
Qu'est - ce que l'hydroxyde de sodium?
Daily Practice:Codeforces Round #794 (Div. 2)(A~D)
Use go language to read TXT file and write it into Excel
Web page Chinese display (print, etc.) GBK error, solution, software
ORACLE CREATE SEQUENCE,ALTER SEQUENCE,DROP SEQUENCE