使用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 ...
随机推荐
- org.hibernate.HibernateException: No Session found for current thread
spring.springmvc和hibernate整合 在sessionFactory.getCurrentSession()时,出现以下异常 No Session found for curren ...
- Java程序设计之消费者和生产者
新建一个Break类,表示食物数量. public class Break { public static final int MAX = 10; //最多一次性煮十个面包 Stack<Inte ...
- Spring多种注入方式及注解实现DI
一.Bean作用域 spring容器创建的时候,会将所有配置的bean对象创建出来,默认bean都是单例的.代码通过getBean()方法从容器获取指定的bean实例,容器首先会调用Bean类的无参构 ...
- Centos6 服务器病毒查杀命令历史
top whereis vhowazeclu ll /usr/bin/v* more /usr/bin/vhowazeclu ps aux|grep vhowa ps aux|grep vhowaze ...
- 如何动态在文档中加入<script></script>写入大段js
<script language="javascript"> var script = document.createElement("script" ...
- document.forms用法
1.FF中不能接受document.forms("formname")的使用,ie中可以 最好改成document.forms["formname"]的下标用法 ...
- linq distinct 不够用了!
问题引出:在实际中遇到一个问题,要进行集合去重,集合内存储的是引用类型,需要根据id进行去重.这个时候linq 的distinct 就不够用了,对于引用类型,它直接比较地址.测试数据如下: class ...
- Android开发自学笔记(Android Studio)—4.3ImageView及其子类
一.引言 ImageView继承自View组件,主要功能用来显示图片,实际上他能显示的不仅是图片,Drawable对象都可以用ImageView来显示. ImageView派生了ImageButton ...
- K - 迷宫问题
/*定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, ...
- cocopod 中添加第三方框架,包含静态库文件,使用svn添加上传
step one: 进入静态库文件的目录 cd 路径: step two:使用命令添加 svn add 静态库名字; 然后更新一下代码就OK