http://blog.sina.com.cn/s/blog_5f4150730101b3ok.html
使用Trados2011翻譯英文html后,如果是單個文件,可在另存譯文時選擇Encoding為utf8,但是項目文件導出時卻沒有選項可以實現編碼的轉換。
方案:可使用Notepad++實現
- 選擇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