﻿ asp國標轉大五碼_電腦知識網

# asp國標轉大五碼

2013-11-13 10:27:43  來源: .NET編程

<%
==================================================

Q Q:

==================================================
Function gbbig(Text)
If IsNull(Text) Or Text = Then Exit Function

Text = ServerUrlEnCode(Text)
b =
Max = Len(Text)
For i= To Max
c = Mid(Texti)
If c = % Then
h = eval(&h+Mid(Texti+))
If h < Then
b = b & chr(h)
i = i+
Else
If isvalidhex(mid(Texti)) Then
If isvalidhex(mid(Texti+)) Then
l = eval(&h+Mid(Texti+))
i = i+
Else
b = b &
i = i+
End If
End If
End If
Else
If c = + Then
b = b &
Else
b = b & c
End If
End If
Next
gbbig = b
End Function

Function isvalidhex(str)
isvalidhex=true
str=ucase(str)
If Len(str) <> Then isvalidhex = false : Exit Function
if Left(str) <> % Then isvalidhex = false : Exit Function
c = Mid(str)
If Not (((c>=) And (c<=)) Or ((c>=A) And (c<=Z))) Then isvalidhex = false : Exit Function
c = Mid(str)
If Not (((c>=) And (c<=)) Or ((c>=A) And (c<=Z))) Then isvalidhex = false : Exit Function
End Function

Function bytesBSTR(vIn)
Dim strReturn
Dim iThisCharCodeNextCharCode
strReturn =
For i = To LenB(vIn)
ThisCharCode = AscB(MidB(vIni))
If ThisCharCode < &H Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIni+))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H + CInt(NextCharCode))
i = i +
End If
Next
bytesBSTR = strReturn
End Function
%>

From:http://tw.wingwit.com/Article/program/net/201311/13717.html