最后一个问题,试试打开ks_cls/kesion.publcicls.asp
找到
Public Function GotTopic(ByVal Str, ByVal strlen)
If Str = "" OR IsNull(Str) Then GotTopic = "":Exit Function
If strlen=0 Then GotTopic=Str:Exit Function
Dim l, T, c, I, strTemp
Str = Replace(Replace(Replace(Replace(Str, " ", " "), """, Chr(34)), ">", ">"), "<", "<")
l = Len(Str)
T = 0
strTemp = Str
strlen = CLng(strlen)
For I = 1 To l
c = Abs(Asc(Mid(Str, I, 1)))
If c > 255 Then
T = T + 2
Else
T = T + 1
End If
If T >= strlen Then
strTemp = Left(Str, I)
Exit For
End If
Next
If strTemp <> Str Then strTemp = strTemp
GotTopic = Replace(Replace(Replace(Replace(strTemp, " ", " "), Chr(34), """), ">", ">"), "<", "<")
End Function
试试改成
Public Function GotTopic(ByVal Str, ByVal lennum)
Dim oRegExp, p_num, i, x
Set oRegExp = new RegExp
oRegExp.IgnoreCase = True
oRegExp.Global = True
oRegExp.Pattern = "[\uff00-\uffff\u4e00-\u9fa5\ufe10-\ufe1f\ufe30-\ufe4f\u1100-\u11ff\u2600-\u26ff\u2700-\u27bf\u2800-\u28ff\u3300-\u33ff\u3200-\u32ff\ua490-\ua4cf\ua000-\ua48f\u3130-\u318f\uac00-\ud7af\u31f0-\u31ff\u30a0-\u30ff\u3040-\u309f\u31a0-\u31bf\u3100-\u312F\u2FF0-\u2FFF\u2F00-\u2FDF\u31c0-\u31ef\u3000-\u303f\u2e80-\u2eff\uff00-\uffef]"
p_num = 0
x = 0
Do While Not p_num > lennum - 2
x = x + 1
p_num = int(p_num) + 1
If oRegExp.Test(str) Then
p_num = p_num + 1
End If
GotTopic = left(trim(str),x)
Loop
Set oRegExp=Nothing
End Function