日期:2014-05-17 浏览次数:21019 次
<% s = "\u5c0f\u867e\u7c73" s = Replace(s, "\u", "%u") Response.Write Unescape(s) %>
------解决方案--------------------
<%
response.Write vbsUnEscape("\u5c0f\u867e\u7c73")
Function vbsUnEscape(str)'解密
dim i,s,c
s=""
For i=1 to Len(str)
c=Mid(str,i,1)
If Mid(str,i,2)="\u" and i<=Len(str)-5 Then
If IsNumeric("&H" & Mid(str,i+2,4)) Then
s = s & CHRW(CInt("&H" & Mid(str,i+2,4)))
i = i+5
Else
s = s & c
End If
ElseIf c="%" and i<=Len(str)-2 Then
If IsNumeric("&H" & Mid(str,i+1,2)) Then
s = s & CHRW(CInt("&H" & Mid(str,i+1,2)))
i = i+2
Else
s = s & c
End If
Else
s = s & c
End If
Next
vbsUnEscape = s
End Function
%>
------解决方案--------------------
不换也可以的,只不过要些一个函数处理