一个字 “燚”
下面这段代码在asp中对大多数中文都可以,但为什么这个字不行呢?
高手赐教
<%
s = "燚"
Response.Write URLDecode(Server.URLEncode (s))
Function URLDecode(strIn)
URLDecode = ""
Dim sl: sl = 1
Dim tl: tl = 1
Dim key: key = "%"
Dim kl: kl = Len(key)
sl = InStr(sl, strIn, key, 1)
Do While sl>0
If (tl=1 And sl<>1) Or tl<sl Then
URLDecode = URLDecode & Mid(strIn, tl, sl-tl)
End If
Dim hh: hh = Mid(strIn, sl+kl, 2)'高位
Dim a: a = Int("&H" & hh)'ascii码
If a<128 Then
sl = sl + 3
Else
Dim hi: hi = Mid(strIn, sl+3+kl, 2)'低位
a = Int("&H" & hh & hi)'非ascii码
sl = sl + 6
End If
URLDecode = URLDecode & Chr(a)
tl = sl
sl = InStr(sl, strIn, key, 1)
Loop
URLDecode = URLDecode & Mid(strIn, tl)
End Function
%>