asp网址分割分问请教!!!

来源:百度知道 编辑:UC知道 时间:2024/05/16 18:18:10
假如我要提取这么一个网址:
http://www.sina.com/北京/123.html

提取后的网址中"北京"两字成了字符串,应该怎样还原成字符呢.

就是显示当前网址.

这个函数是反编辑程序,可以帮你转换,使用方法为:urldecode("%C1%F7%CF%E3%D3%F0")
Function URLDecode(strUrlEnCode)
        Dim strURLDecode
        Dim c, i, v
        strURLDecode=""
        For i = 1 to Len(strUrlEnCode)
                c = Mid(strUrlEnCode,i,1)
                If c = "%" Then
                        v = eval("&h" + Mid(strUrlEnCode, i + 1, 2))