调用JS里unescape的问题
Private Function Unescape(ByVal pstrInput As String) As String Dim objScrCtl As Object Set objScrCtl = CreateObject("MSScriptControl.ScriptControl") objScrCtl.Language = "JavaScript" Unescape = objScrCtl.Eval("unescape('" & pstrInput & "');") Set objScrCtl = NothingEnd Function
'┏〓〓〓〓〓〓〓〓〓 UtoStr,start 〓〓〓〓〓〓〓〓〓┓'[简介]:'Unicode字符转换为普通字符Function UtoStr(Ustr As String) As String '帮你写函数,帮你写代码,帮你写模块,帮你设计软件 '--需要什么函数或功能,可以联系我。 '版权所有,请保留作者信息. '如需商业用途请联系作者QQ:1085992075 Dim SArr() As String SArr = Split(Ustr, "\u") Dim I As Long Dim DST As String DST = SArr(I) For I = 1 To UBound(SArr) If Len(SArr(I)) = 4 Then DST = DST & ChrW(val("&H" & SArr(I))) ElseIf Len(SArr(I)) > 4 Then DST = DST & ChrW(val("&H" & Left(SArr(I), 4))) & Mid(SArr(I), 5) Else DST = DST & SArr(I) End If Next UToStr = DST 'Dim gb2312() As Byte 'gb2312 = StrConv(DST, vbFromUnicode)End Function'┗〓〓〓〓〓〓〓〓〓 UtoStr,end 〓〓〓〓〓〓〓〓〓┛