打开
ks_cls/kesion.commoncls.asp
找到如下代码
- '判断有没有中文
- function HasChinese(str)
- HasChinese = false
- dim i
- for i=1 to Len(str)
- if Asc(Mid(str,i,1)) < 0 then
- HasChinese = true :exit for
- end if
- next
- end function
替换为
- '判断有没有中文
- Function HasChinese(Content)
- Dim regEx, Matches, Match
- Set regEx = New RegExp
- regEx.Pattern="[\u4e00-\u9fa5]+"
- regEx.IgnoreCase = True
- regEx.Global = True
- Set Matches = regEx.Execute(Content)
- If Matches.count > 0 Then
- HasChinese=true
- Else
- HasChinese=false
- end if
- End Function