String str = new String("暗示大家".getBytes(),"UTF-8");重新用utf-8编码
或者用URLDecoder.decode("xxxxxx", "UTF-8");重新用utf-8解码
UTF-8(8-bit Unicode Transformation Format)是一种针对Unicode的可变长度字符编码,又称万国码。由Ken Thompson于1992年创建。现在已经标准化为RFC 3629。UTF-8用1到6个字节编码UNICODE字符。用在网页上可以同一页面显示中文简体繁体及其它语言。
你的那个不是utf-8的,是url编码,用下面这个就可以了.
<%
key=request("key")
Dim s
dim t
dim i
dim jjjj
dim h
dim l
dim xxxx
s=""
xxxx=Len(key)
For i =1 to xxxx
t = Mid(key,i,1)
jjjj = Asc(t)
If jjjj> 0 Then
If f Then
s = s & "%" & Right("00" & Hex(Asc(t)),2)
Else
s = s & t
End If
Else
If jjjj < 0 Then jjjj = jjjj + &H10000
h = (jjjj And &HFF00) \ &HFF
l = jjjj And &HFF
s = s & "%" & Hex(h) & "%" & Hex(l)
End If
Next
set rs=server.CreateObject("adodb.recordset")
sql="select * from szbus where line like '%"&Key&"%' or title like '%"&Key&"%' or keyworks like '%"&Key&"%' order by ID desc"
rs.open sql,conn,1,1
%>
server.urldecode(request("key")) 吧
server.htmlencode(request("key"))
server.urlencode(request("key"))
具体用哪一个我忘了。呵呵。去测试一下就知道了