<%
'Retrieve the first letter of each Chinese Character in the field data
Function getpychar (char)
Tmp = 65536 + Asc (char)
If (tmp> = 45217 And tmp <= 45252) Then
Getpychar = ""
ElseIf (tmp & gt; = 45253 And tmp <= 45760) Then
Getpychar = "B"
ElseIf (tmp & gt; = 47761 And tmp <= 46317) Then
Getpychar = "C"
ElseIf (tmp & gt; = 46318 And tmp <= 46825) Then
Getpychar = "D"
ElseIf (tmp & gt; = 46826 And tmp <= 47009) Then
Getpychar = "E"
ElseIf (tmp & gt; = 47010 And tmp <= 47296) Then
Getpychar = "F"
ElseIf (tmp & gt; = 47297 And tmp <= 47613) Then
Getpychar = "G"
ElseIf (tmp & gt; = 47614 And tmp <= 48118) Then
Getpychar = "H"
ElseIf (tmp & gt; = 48119 And tmp <= 49061) Then
Getpychar = "J"
ElseIf (tmp & gt; = 49062 And tmp <= 49323) Then
Getpychar = "K"
ElseIf (tmp & gt; = 49324 And tmp <= 49895) Then
Getpychar = "L"
ElseIf (tmp & gt; = 49896 And tmp <= 50370) Then
Getpychar = "M"
ElseIf (tmp & gt; = 50371 And tmp <= 50613) Then
Getpychar = "N"
ElseIf (tmp & gt; = 50614 And tmp <= 50621) Then
Getpychar = "O"
ElseIf (tmp & gt; = 50622 And tmp <= 50905) Then
Getpychar = "P"
ElseIf (tmp & gt; = 50906 And tmp <= 51386) Then
Getpychar = "Q"
ElseIf (tmp & gt; = 51387 And tmp <= 51445) Then
Getpychar = "R"
ElseIf (tmp & gt; = 51446 And tmp <= 52217) Then
Getpychar = "S"
ElseIf (tmp & gt; = 52218 And tmp <= 52697) Then
Getpychar = "T"
ElseIf (tmp & gt; = 52698 And tmp <= 52979) Then
Getpychar = "W"
ElseIf (tmp & gt; = 52980 And tmp <= 53640) Then
Getpychar = "X"
ElseIf (tmp & gt; = 53689 And tmp <= 54480) Then
Getpychar = "Y"
ElseIf (tmp & gt; = 54481 And tmp <= 62289) Then
Getpychar = "Z"
Else' if it is not Chinese, it will not be processed
Getpychar = char
End If
End Function
Function getpy (Str)
For I = 1 To Len (Str)
Getpy = getpy & getpychar (Mid (Str, I, 1 ))
Next
End Function
%>