%
'Coding.inc.asp
'All Rights Reserved, Room3rd@hotmail.com
Function Encode(Str)
Dim Count, Pos, Ch, Code
Dim SweetCh
'SweetCh中表示不需要进行编码的字符
SweetCh = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz_{}[]()"
Encode = ""
Count = Len(Str)
Pos = 1
Do While Pos=Count
Ch = Mid(Str, Pos, 1)
Code = Asc(Ch)
If Code=0 And Code256 Then '汉字不予处理
If Ch"%" Then
If InStr(SweetCh, Ch)=0 Then
...[ 查看全文 ]