abcbuzhiming 发表于 2010-1-19 14:02

arikado 发表于 2010-1-19 14:06

Convert Z

chillicez 发表于 2010-1-19 14:13

vim / Emeditor

Duomoe 发表于 2010-1-19 14:18

CueCode + Convert Z

jing86 发表于 2010-1-19 14:49

IE

ayako1986 发表于 2010-1-19 15:17

文件名:编码转换.vbs

on error resume next
Set WshShell=WScript.CreateObject(\"Shell.Application\")
dirPath=WshShell.BrowseForFolder(0, \"请选择路径\", 0, \"\").items().item().path
if right(dirPath,1)<>\"\\\" then dirPath=dirpath&\"\\\"
ma=inputbox(\"请输入要转换为的编码\",\"\",\"utf-8\")
if ma=\"\" or dirPath=\"\\\" or msgbox(\"在使用前请确认已备份文件夹\"&dirPath,1)=2 then WScript.Quit

\'遍历文件夹下的文件
Set FSO = CreateObject(\"scripting.filesystemobject\")
Set f = FSO.GetFolder(dirPath)
Set fs = f.files
For Each fileN in fs
FN=dirPath&fileN.name&\"\"
if \".txt\"=lcase(right(FN,4)) then Call WriteToFile(FN, ReadFile(FN, CheckCode(FN)), ma)
Next
Set FSO = Nothing
wscript.echo \"全部成功\"

\'检测文件的编码
Function CheckCode (FileUrl)
Dim slz
set slz = CreateObject(\"Adodb.Stream\")
slz.Type = 1
slz.Mode = 3
slz.Open
slz.Position = 0
slz.Loadfromfile FileUrl
Bin=slz.read(2)
if AscB(MidB(Bin,1,1))=&HEF and AscB(MidB(Bin,2,1))=&HBB Then
Codes=\"UTF-8\"
elseif AscB(MidB(Bin,1,1))=&HFF and AscB(MidB(Bin,2,1))=&HFE Then
Codes=\"Unicode\"
else
Codes=\"GB2312\"
end if
slz.Close
set slz = Nothing
CheckCode=Codes
End Function

\'以指定的编码读取文件
Function ReadFile(FileUrl, CharSet)
On Error Resume Next
Dim Str
Set stm = CreateObject(\"Adodb.Stream\")
stm.Type = 2
stm.mode = 3
stm.charset = CharSet
stm.Open
stm.loadfromfile FileUrl
Str = stm.readtext
stm.Close
Set stm = Nothing
wscript.echo Str
ReadFile = Str
End Function

\'以指定的编码写文件
Function WriteToFile (FileUrl, Str, CharSet)
On Error Resume Next
Set stm = CreateObject(\"Adodb.Stream\")
stm.Type = 2
stm.mode = 3
stm.charset = CharSet
stm.Open
stm.WriteText Str
stm.SaveToFile FileUrl, 2
stm.flush
stm.Close
Set stm = Nothing
End Function

试了下这玩意好像还行

superbigd 发表于 2010-1-19 17:10

澄空那有个自制的小软件ruby什么的
好像还有个蓝宝石吧
用过几次,不错

鸡蛋灌饼 发表于 2010-1-19 17:42

iconv
http://gnuwin32.sourceforge.net/packages/libiconv.htm

hxy8241 发表于 2010-1-19 17:52

MadEdit

魔鬼在细 发表于 2010-1-19 18:51

notepad2

moody 发表于 2010-1-20 03:31

textwrangler

Stuka 发表于 2010-1-20 03:45

五花八门

michine 发表于 2010-1-20 07:46

之前经常用南极星自带的转码工具。

好人修電腦 发表于 2010-1-20 08:06

超级批量编码转换

最快,沒有之一

stshin 发表于 2010-1-20 15:11

二连,悲剧

stshin 发表于 2010-1-20 15:11

textforever,写comicviewer的老马写的,还带很多其他实用功能,非常好用

hzqiji 发表于 2010-1-20 15:34

Convert Z很好用,就是UI做得很另类,win7下有些兼容性问题
页: [1]
查看完整版本: 用啥工具能最快的改变txt的编码