CopyCode The Code is as follows :'************************************
'Intercept text length function, support UTF-8
'Input parameters:
1. Text Content
'2. Maximum text Length
'************************************
Public Function cut_title (title, tlen)
Dim K, I, D, C
Dim istr
Dim fortotal
If cdbl (tlen)> 0 then
K = 0
D = strlen (title)
Istr = ""
Fortotal = Len (title)
For I = 1 to fortotal
C = ABS (ASCW (mid (title, I, 1 )))
If C & gt; 255 then
K = K + 2
Else
K = k + 1
End if
Istr = istr & Mid (title, I, 1)
If clng (k)> clng (tlen) then
Istr = istr ".."
Exit
End if
Next
Cut_title = istr
Else
Cut_title = ""
End if
End Function
'*******************************
'Checking text length function, supporting UTF-8
'Input parameters:
1. Text Content
'*******************************
Public Function strlen (strtext)
Dim K, I, C
Dim fortotal
K = 0
Fortotal = Len (strtext)
For I = 1 to fortotal
C = ABS (ASCW (mid (strtext, I, 1 )))
If C & gt; 255 then
K = K + 2
Else
K = k + 1
End if
Next
Strlen = K
End Function