如何区分数据是英文还是中文?

从数据库调出数据时,用什么方法分辨数据是英文还是中文?

请帮忙。

我用的是SQL2000.
---------------------------------------------------------------

http://www.csdn.net/expert/topic/635/635302.xml?temp=.8362543
---------------------------------------------------------------

for i=1 to len(yourstr)
if asc(mid(yourstr,i,1))<255 and asc(mid(yourstr,i,1))>0 then
IsEnglish=true
else
IsEnglish=false
end if
next
if IsEnglish=true then
response.write "基本是键盘上有的东西啦!"
response.write "给分啦!不给我哭!"
else
response.write "含有键盘以外的东西啦!"
end if

Published At
Categories with Web编程
Tagged with
comments powered by Disqus