|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
VBA万岁 发表于 2014-11-20 11:35 ![](static/image/common/back.gif)
这个问题现已经得到解决,详见吴姐的帖子第20楼及513楼):
不懂html也来学网抓(xmlhttp/winhttp+fiddl ...
以下test2代码可能有误——因为我没见过汉字的unicode码(即“\u”形式的编码),你能传一些汉字的unicode码上来测试吗?
Function GBKEnCode(strText)
Dim i, s
For i = 1 To Len(strText)
s = Hex(Asc(Mid(strText, i, 1)))
If Len(s) = 4 Then s = Left(s, 2) & "%" & Right(s, 2)
GBKEnCode = GBKEnCode & "%" & s
Next
End Function
Sub test2()
MsgBox Replace(GBKEnCode("HTTP://www.apabi.com/ValidateCode.aspx的"), "%", "\u00")
End Sub |
|