|
楼主 |
发表于 2009-6-27 09:24:38
|
显示全部楼层
1# jieelin
刚在BAIDU上搜了一下,竟然找到了解决方法. 呵呵. 用这个函数转换一下就可以了.
Func _UnicodeURLEncode($UnicodeURL) ;==>_UnicodeURLEncode
Local $UnicodeBinaryLength,$UnicodeBinary,$UnicodeBinary2
$UnicodeBinary = StringToBinary ($UnicodeURL,4)
$UnicodeBinary2 = StringReplace($UnicodeBinary, '0x', '', 1)
$UnicodeBinaryLength = StringLen($UnicodeBinary2)
Local $EncodedString,$UnicodeBinaryChar,$EncodedString
For $i = 1 To $UnicodeBinaryLength Step 2
$UnicodeBinaryChar = StringMid($UnicodeBinary2, $i, 2)
If StringInStr("$-_.+!*'(),;/?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", BinaryToString ('0x' & $UnicodeBinaryChar,4)) Then
$EncodedString &= BinaryToString ('0x' & $UnicodeBinaryChar)
Else
$EncodedString &= '%' & $UnicodeBinaryChar
EndIf
Next
Return $EncodedString
EndFunc |
|