function strLength(str)
ON ERROR RESUME NEXT
dim WINNT_CHINESE
WINNT_CHINESE = (len("論壇")=
if WINNT_CHINESE then
dim l
dim i
l=len(str)
t=l
for i=
c=asc(mid(str
if c<
if c>
t=t+
End if
next
strLength=t
else
strLength=len(str)
End if
if err
End function
From:http://tw.wingwit.com/Article/program/net/201311/14425.html