%
'检查QueryString是否是UTF-8编码,如果是,则需要先将Session.CodePage设置成65001后才能获取正确的参数值
Set o_regx = New Regexp
o_regx.Pattern = "^(?:[\x00-\x7f]|[\xfc-\xff][\x80-\xbf]{5}|[\xf8-\xfb][\x80-\xbf]{4}|[\xf0-\xf7][\x80-\xbf]{3}|[\xe0-\xef][\x80-\xbf]{2}|[\xc0-\xdf][\x80-\xbf])+$"
s=unescape(Request.ServerVariables("QUERY_STRING"))
'for each obj in request.form
' response.write obj & " " & request.form(obj) & "
"
' next
if o_regx.Test(s) then
Session.CodePage = 65001
Department=Request("department")
Session.CodePage = 936
else
Department=Request("department")
end if
%>