top
Loading...
如何檢測備注字段的字節數
視服務器操作系統語種不同,而采取不同的方法:
1.E文下,len(rs("field")),就行了.len("中文abc")=7
2.Z文下,復雜一點,len("中文abc")=5
lenB("中文abc")=10,所以需要自己寫程序判斷其長度.
function strLen(str)
dim i,l,t,c
l=len(str)
t=l
for i=1 to l
c=asc(mid(str,i,1))
if c<0 then c=c+65536
if c>255 then
t=t+1
end if
next
strLen=t
end function
北斗有巢氏 有巢氏北斗