\u5c0f\u867e\u7c73
js里比较容易,unescape就可以搞定了。ASP中不会弄,求教大虾们给予帮助,谢谢!
求个可用的ASP函数,把上面编码形式字符的转换成汉字输出!
人在线等,有满意答案立即给分结贴,不会拖延!
------解决方案--------------------
- VBScript code
<% s = "\u5c0f\u867e\u7c73" s = Replace(s, "\u", "%u") Response.Write Unescape(s) %>
------解决方案--------------------
- VBScript code
<% 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 %>
------解决方案--------------------
不换也可以的,只不过要些一个函数处理