使用Notepad++实现批量将ANSI转成为UTF-8编码
http://blog.sina.com.cn/s/blog_5f4150730101b3ok.html
使用Trados2011翻译英文html后,如果是单个文件,可在另存译文时选择Encoding为utf8,但是项目文件导出时却没有选项可以实现编码的转换。
- 选择Plugins->Plugin Manager->Show Plugin Manager
- 安装 Python Script。安装后重启Notepad++
- 一次选择 Plugins->Python Script->New script.
- 命名为ansi2utf8,复制以下代码
convertToUTF8.py
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()
参考:http://stackoverflow.com/questions/7256049/notepad-converting-ansi-encoded-file-to-utf-8
import os;
import sys;
filePathSrc="D:\\Eclipse\\eclipse-standard-kepler-SR1-win32\\workspace\\ALBasicServer-master\\ALBasicServer\\src\\ALBasicServer" # Path to the folder with files to convert
for root, dirs, files in os.walk(filePathSrc):
for fn in files :
if fn[-4:] == '.java' :
notepad.open(root + "\\" + fn)
notepad.runMenuCommand("Encoding", "Convert to UTF-8")
notepad.save()
notepad.close()
还不如直接下载工具呢:http://www.crsky.com/soft/29270.html 好用!!!!!!!!!!
TextEncoding.exe
使用Notepad++实现批量将ANSI转成为UTF-8编码的更多相关文章
- 如何将lrc歌词文件批量转换为ANSI编码?
有些MP3.MP4或学习机只能播放ANSI编码的歌词文件,可是从网站上下载的歌词大多是UTF-8或者其它机器支持不了的编码,如何批量将这些lrc歌词文件转换成ANSI编码的文件呢? 工具/原料 萍客T ...
- unicode,ansi,utf-8,unicode big endian编码的区别
知乎--http://www.zhihu.com/question/23374078 http://wenku.baidu.com/view/cb9fe505cc17552707220865.html ...
- <转>巧用notepad++ 批量转换ansi 和 utf8
原方出处:http://stackoverflow.com/questions/7256049/notepad-converting-ansi-encoded-file-to-utf-8 Here s ...
- 【问题解决方案】editplus中批量将ANSI转换为utf-8
来自一个用editplus写java程序但是上传到GitHub里中文乱码的故事 大致步骤: editplus全部打开之后(打开为何种编码不重要): (全部打开是指在左下方的文件列表选中-->右击 ...
- 从Java String实例来理解ANSI、Unicode、BMP、UTF等编码概念
转(http://www.codeceo.com/article/java-string-ansi-unicode-bmp-utf.html#0-tsina-1-10971-397232819ff9a ...
- Notepad++使用技法
Alt+H 隐藏行 Ctrl+Tab 实现在多个打开的窗口间切换 Ctrl+Shift+Q区块注释 Ctrl+K行注释(取消Ctrl+Shift+K) 文件 新建文件 Ctrl+N 打开文件 C ...
- 浅谈Notepad++选中行操作+快捷键+使用技巧【超详解】
Notepad++选中行操作 快捷键 使用技巧 用Notepad++写代码,要是有一些重复的代码想copy一下,还真不容易,又得动用鼠标,巨烦人.... 有木有简单的方法呢,确实还是有的不过也不算太好 ...
- 轻量级文本编辑器,Notepad最佳替代品:Notepad++
目录 正文之前 1. 目的 2. 原帖 3. 为何推荐Notepad++ 3.1. Notepad++的一些基本特点 3.2. notepad,notepad2,notepad++,ultraEdit ...
- Notepad++快捷使用
用Notepad++写代码,要是有一些重复的代码想copy一下有木有简单的方法呢,确实还是有的不过也不算太好用.主要是应用键盘上的 Home 键 和 End 键.鼠标光标停留在一行的某处,按 Home ...
随机推荐
- 将对象转化成json字符串
public static String getObjectString(Object object){ String ObjectString = null; try { ObjectMapper ...
- WPScan用法
kali下集成的WPScan用法 1.刺探基础信息:wpscan --url http://www.example.com 2.猜解后台用户名wpscan --url http://www.examp ...
- SqlMetal.exe ORM代码生成
作甚? 先说说这个工具是干啥的,我们所做的程序,或多或少需要存储一些数据到数据库,当然直接使用Sql语句也可以,甚至有些情况下就是要使用sql语句,但对于一些基本的增删改查,对每张表都要写查询语句就显 ...
- md5和SHA校验码
md5已经不安全了,中国山东大学女学霸王小云破解了一系列密码,当真是巾帼不让须眉.说是破解,其实就是给你一个md5码,让你求出这个md5码所对应的原始信息,显然一个md5对应无数种原始信息.而md5的 ...
- 51nod 1005 大数加法
#include<iostream> #include<string> using namespace std; #define MAXN 10001 },b[MAXN]={} ...
- 【jQuery api】isArray
<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-l ...
- 【原创】相对完美的垂直居中popup(modal/dialog),无需监听window.resize事件
<table class="popup" style="position: absolute; background-color: black; border-ra ...
- SharePoint远程调试CSS
1.在浏览器中找到需要调试的样式文件: 2.在SharePoint打开对应的文件,直接修改看到效果:
- Asp.Net MVC<三> : ASP.NET MVC 基本原理及项目创建
MVC之前的那点事儿系列 解读ASP.NET 5 & MVC6系列 MVC模拟(摘自ASP.NET MVC5框架揭秘) Asp.net中,通过HttpModule的形式定义拦截器,也就是路由表 ...
- UIActivityViewController 系统社交化 共享
1.UIActivityViewController是继承自UIViewController,是拥有VC的特性 a.初始化 init , initWithActivityItems:applicat ...