用ASP开发的时候遇到一个解码问题。虽然在ASP中使用Request获取编码过URL字符串会自动解码,但是Request.BinaryRead(Request.TotalBytes)取得Post数据时却不会解码,所以只能手动进行解码。
ASP解码函数:
Function URLDecode(enStr)
dim deStr,strSpecial
dim c,i,v
deStr=
strSpecial=!#$%&'()*+,.-_/:;<=>?@[/]^`{|}~%
for i=1 to len(enStr)
c=Mid(enStr,i,1)
if c