In fact, the best way to judge Chinese is the js I wrote in the last article. This is a type of asp. As long as it is double bytes, it is judged as Chinese. In ASP (VBScript is the language), the return value of the Asc function is less than 0, can be judged as Chinese characters. The Asc function returns the ANSI character code corresponding to the first letter of a string.
Copy the code code as follows:
'Determine whether there are Chinese characters in the string
'Yes - return true
'None - returns false
'The Chinese characters here may also include Japanese, Korean and other oriental characters
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