程亚丽最新消息,维基解密黄菊自杀,朝鲜中央电视台直播
只要下载此文件后便可以查询了.
下面是详细代码
'querycode.vbs by: fastslz
'支持批量查询,可以放在sendto扩展应用
set files=wscript.arguments
if files.count=0 then
msgbox "请将要查询的文件拖动到这个文件里! ", vbinformation, "文件编码查询工具 by: fastslz"
end if
for i=0 to files.count-1
file=files(i)
call checkcode (" 编码为:")
next
function checkcode (usage)
dim slz
set slz = createobject("adodb.stream")
slz.type = 1
slz.mode = 3
slz.open
slz.position = 0
slz.loadfromfile file
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
wscript.echo file,usage,codes
slz.close
set slz = nothing
end function
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
相关文章:
-
-
-
-
-
-
用vbs实现文本循环读取
因为测试中需要读取一批url数据进行浏览,其实使用qtp本身的table能实现多种读取方式,但是因为需要tabel是使用excel保存的,在没有...
[阅读全文]
-
-
-
-
-
网友评论