大相径庭和南辕北辙:如何在gb2312页面中通过response.redirect向utf-8传中文参数?

来源:百度文库 编辑:神马品牌网 时间:2024/05/05 07:27:38
参考地址:
verycd.com使用的是
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
当使用中文关键字搜索时,搜索结果不对.

http://find.verycd.com/folders?kw=%e8%8c%89%e8%8e%89%e8%8a%b1%e5%bc%80

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<%
Response.Redirect("http://search.verycd.com/query/茉莉花开/")
%>
</body>
</html>
这样搜索是对的.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<%
key = request.QueryString("key")
Response.Redirect("http://search.verycd.com/query/" & key & "/")
%>
</body>
</html>

这样就不行.应该怎么处理才正确呢?