Here some simple steps to convert multiple files via Notepad++ without messing up with special characters (for ex. diacritical marks).
- Run Notepad++ and then open menu Plugins->Plugin Manager->Show Plugin Manager
- Install Python Script. When plugin is installed, restart the application.
- Choose menu Plugins->Python Script->New script.
- Choose its name, and then past the following code:
convertToUTF8.py
import os;
import sys;
filePathSrc="C:\Users\" # Path to the folder with files to convert
for root, dirs, files in os.walk(filePathSrc):
for fn in files:
if fn[-4:] == '.xml': # Specify type of the files
notepad.open(root + "\" + fn)
notepad.runMenuCommand("Encoding", "Convert to UTF-8")
notepad.save()
notepad.close()
After all, run the script
最后
以上就是苗条钢铁侠最近收集整理的关于使用Notepad++批量转换源代码编码方式的全部内容,更多相关使用Notepad++批量转换源代码编码方式内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复