可以用如下程序進行編碼:,我想解碼就不用我說了吧,(就是逆運算了)
Function DisUni(strInput)
Dim res
Dim i
i=1
Do while i<LenB(strinput)
if CLng(AscB(MidB(strInput, i+1, 1))) * 256 + AscB(MidB(strInput, i, 1))<>0 then
res = res & "&#" & CStr(CLng(AscB(MidB(strInput, i+1, 1))) * 256 + AscB(MidB(strInput, i, 1))) & ";"
end if
i=i+2
Loop
DisUni = res
End Function