当前位置:网站首页>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 .
边栏推荐
- Simple operation of running water lamp (keil5)
- Using GEE plug-in in QGIS
- Latex notes
- Pit record of Chmod 2 options in deepin
- Shadowless cloud desktop - online computer
- Detailed explanation of miracast Technology (I): Wi Fi display
- Typecho adds Baidu collection (automatic API submission plug-in and crawler protocol)
- When jupyter notebook is encountered, erroe appears in the name and is not output after running, but an empty line of code is added downward, and [] is empty
- [MySQL] database knowledge record
- Play with grpc - go deep into concepts and principles
猜你喜欢

Daily Practice:Codeforces Round #794 (Div. 2)(A~D)

【idea】Could not autowire. No beans of xxx type found

Practical application cases of digital Twins - fans

Idea common settings

Play with grpc - go deep into concepts and principles

Build your own random wallpaper API for free

Today, share the wonderful and beautiful theme of idea + website address

Rough notes of C language (2) -- constants

Chapter 2: try to implement a simple bean container

Numpy——1.数组的创建
随机推荐
Function of static
Ue5 hot update - remote server automatic download and version detection (simplehotupdate)
Web page Chinese display (print, etc.) GBK error, solution, software
Line test -- data analysis -- FB -- teacher Gao Zhao
Ggplot2 drawing learning notes in R
Shadowless cloud desktop - online computer
Leetcode solution - number of islands
Simple operation with independent keys (hey, a little fancy) (keil5)
Reading literature sorting 20220104
Build your own random wallpaper API for free
The folder directly enters CMD mode, with the same folder location
The SQL implementation has multiple records with the same ID, and the latest one is taken
Thunderbird tutorial \ easy to use mail client
Typecho adds Baidu collection (automatic API submission plug-in and crawler protocol)
CADD课程学习(5)-- 构建靶点已知的化合结构(ChemDraw)
MySql——存储引擎
Pit record of Chmod 2 options in deepin
R language learning notes 1
Unforgettable summary of 2021
Explanation of parallel search set theory and code implementation