最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp检测文件编码
时间:2022-07-02 23:17:22 编辑:袖梨 来源:一聚教程网
function checkcode(path)
set objstream=server.createobject("adodb.stream")
objstream.Type=1
objstream.mode=3
objstream.open
objstream.Position=0
objstream.loadfromfile path
bintou=objstream.read(2)
If AscB(MidB(bintou,1,1))=&HEF And AscB(MidB(bintou,2,1))=&HBB Then
checkcoder="utf-8"
ElseIf AscB(MidB(bintou,1,1))=&HFF And AscB(MidB(bintou,2,1))=&HFE Then
checkcode="unicode"
Else
checkcode="gb2312"
End If
objstream.close
set objstream=nothing
end function
相关文章
- 逆战未来乘风破浪榴弹炮有什么玩法技巧 09-18
- 异星探险家小车车怎么制作 09-18
- 永劫无间铠甲勇士联动有什么内容 09-18
- 碧蓝航线水无濑角色如何 09-18
- 崩坏星穹铁道3.6上半卡池怎么抽-长夜月和大黑塔抽取优先级 09-18
- 失控进化塔防模式怎么玩 09-18