Function UrlDecode_GBToUtf8(ByVal str) Dim B,ub ''中文字的Unicode码(2字节) Dim UtfB ''Utf-8单个字节 Dim UtfB1, UtfB2, UtfB3 ''Utf-8码的三个字节 Dim i, n, s n=0 ub=0 For i = 1 To Len(str) B=Mid(str, i, 1) Select Case B Case "+" s=s & " " Case "%" ub=Mid(str, i + 1, 2) UtfB = CInt("&H" & ub) If UtfB<128 Then i=i+2 s=s & ChrW(UtfB) Else UtfB1=(UtfB And &H0F) * &H1000 ''取第1个Utf-8字节的二进制后4位 UtfB2=(CInt("&H" & Mid(str, i + 4, 2)) And &H3F) * &H40 ''取第2个Utf-8字节的二进制后6位 UtfB3=CInt("&H" & Mid(str, i + 7, 2)) And &H3F ''取第3个Utf-8字节的二进制后6位 s=s & ChrW(UtfB1 Or UtfB2 Or UtfB3) i=i+8 End If Case Else ''Ascii码 s=s & B End Select Next UrlDecode_GBToUtf8 = s End Function response.write UrlDecode_GBToUtf8("%E6%96%B0%E5%85%B4%E7%BD%91%E7%BB%9C")