Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:拼音.table |
Dim n as integer
Dim T,T1 as string
Dim dr,dr1 As DataRow
dr = e.DataRow
if e.DataCol.Name = "名称" then
if dr("名称") Is Nothing then
dr("拼音") = Nothing
else
for n = 0 to dr("名称").Length-1
T1 = dr("名称").substring(n,1)
dr1 = DataTables("拼音").Find("[字] = '" & T1 & "'")
if dr1 Isnot Nothing then
T = T & dr1("音")
else
T = T & T1
End if
Next
dr("拼音") = T.ToUpper
End If
End if
Public Function GetPY(ByVal strWords As String) As String
'返回汉字的拼音首字母大写字符串,支持 GBK 大字符集
Dim sReturn, sOneTxt As String
Dim i As Integer
For i = 0 To strWords.Length - 1
sOneTxt = strWords.Substring(i, 1)
sReturn = sReturn + GetGbkX(sOneTxt)
Next
Return sReturn
End Function
Private Function GetGbkX(ByVal str As String) As String
If str.CompareTo("吖") < 0 Then
Return str
End If
If str.CompareTo("八") < 0 Then
Return "A"
End If
If str.CompareTo("嚓") < 0 Then
Return "B"
End If
If str.CompareTo("咑") < 0 Then
Return "C"
End If
If str.CompareTo("妸") < 0 Then
Return "D"
End If
If str.CompareTo("发") < 0 Then
Return "E"
End If
If str.CompareTo("旮") < 0 Then
Return "F"
End If
If str.CompareTo("铪") < 0 Then
Return "G"
End If
If str.CompareTo("讥") < 0 Then
Return "H"
End If
If str.CompareTo("咔") < 0 Then
Return "J"
End If
If str.CompareTo("垃") < 0 Then
Return "K"
End If
If str.CompareTo("嘸") < 0 Then
Return "L"
End If
If str.CompareTo("拏") < 0 Then
Return "M"
End If
If str.CompareTo("噢") < 0 Then
Return "N"
End If
If str.CompareTo("妑") < 0 Then
Return "O"
End If
If str.CompareTo("七") < 0 Then
Return "P"
End If
If str.CompareTo("亽") < 0 Then
Return "Q"
End If
If str.CompareTo("仨") < 0 Then
Return "R"
End If
If str.CompareTo("他") < 0 Then
Return "S"
End If
If str.CompareTo("哇") < 0 Then
Return "T"
End If
If str.CompareTo("夕") < 0 Then
Return "W"
End If
If str.CompareTo("丫") < 0 Then
Return "X"
End If
If str.CompareTo("帀") < 0 Then
Return "Y"
End If
If str.CompareTo("咗") < 0 Then
Return "Z"
End If
Return str
End Function