自动读取汉字的汉语拼音(100分)

  • 主题发起人 主题发起人 阿群
  • 开始时间 开始时间

阿群

Unregistered / Unconfirmed
GUEST, unregistred user!
[?]各路高人!如何读取一个汉字的汉语拼音?
 
试一试这个:<br>unit HzSpell;<br><br>interface<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Classes;<br><br>type<br>&nbsp; THzSpell = class(TComponent)<br>&nbsp; protected<br>&nbsp; &nbsp; FHzText: String;<br>&nbsp; &nbsp; FSpell: String;<br>&nbsp; &nbsp; FSpellH: String;<br>&nbsp; &nbsp; procedure SetHzText(const Value: String);<br>&nbsp; &nbsp; function GetHzSpell: String;<br>&nbsp; &nbsp; function GetPyHead: String;<br>&nbsp; public<br>&nbsp; &nbsp; class function PyOfHz(Hz: String): String;<br>&nbsp; &nbsp; class function PyHeadOfHz(Hz: String): String;<br>&nbsp; published<br>&nbsp; &nbsp; property HzText: String read FHzText write SetHzText;<br>&nbsp; &nbsp; property HzSpell: String read GetHzSpell;<br>&nbsp; &nbsp; property PyHead: String read GetPyHead;<br>&nbsp; end;<br><br>{$I HzSpDat2.inc}<br><br>procedure Register;<br><br>function GetHzPy(HzChar: PChar; Len: Integer): String;<br>function GetHzPyFull(HzChar: String): String;<br>function GetHzPyHead(HzChar: PChar; Len: Integer): String;<br>function GetPyChars(HzChar: String): String;<br><br>implementation<br><br>procedure Register;<br>begin<br>&nbsp; RegisterComponents('System', [THzSpell]);<br>end;<br><br>function GetHzPy(HzChar: PChar; Len: Integer): String;<br>var<br>&nbsp; C: Char;<br>&nbsp; Index: Integer;<br>begin<br>&nbsp; Result := '';<br>&nbsp; if (Len &gt; 1) and (HzChar[0] &gt;= #129) and (HzChar[1] &gt;= #64) then<br>&nbsp; begin<br>&nbsp; &nbsp; //是否为 GBK 字符<br>&nbsp; &nbsp; case HzChar[0] of<br>&nbsp; &nbsp; &nbsp; #163: &nbsp;// 全角 ASCII<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; C := Chr(Ord(HzChar[1]) - 128);<br>&nbsp; &nbsp; &nbsp; &nbsp; if C in ['a'..'z', 'A'..'Z', '0'..'9', '(', ')', '[', ']'] then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := C<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := '';<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; #162: // 罗马数字<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; if HzChar[1] &gt; #160 then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := CharIndex[Ord(HzChar[1]) - 160]<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := '';<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; #166: // 希腊字母<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; if HzChar[1] in [#$A1..#$B8] then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := CharIndex2[Ord(HzChar[1]) - $A0]<br>&nbsp; &nbsp; &nbsp; &nbsp; else if HzChar[1] in [#$C1..#$D8] then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := CharIndex2[Ord(HzChar[1]) - $C0]<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := '';<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; begin &nbsp;// 获得拼音索引<br>&nbsp; &nbsp; &nbsp; &nbsp; Index := PyCodeIndex[Ord(HzChar[0]) - 128, Ord(HzChar[1]) - 63];<br>&nbsp; &nbsp; &nbsp; &nbsp; if Index = 0 then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := ''<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := PyMusicCode[Index];<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; end;<br>&nbsp; end<br>&nbsp; else if Len &gt; 0 then<br>&nbsp; begin<br>&nbsp; &nbsp; //在 GBK 字符集外, 即半角字符<br>&nbsp; &nbsp; if HzChar[0] in ['a'..'z', 'A'..'Z', '0'..'9', '(', ')', '[', ']'] then<br>&nbsp; &nbsp; &nbsp; Result := HzChar[0]<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; Result := '';<br>&nbsp; end;<br>end;<br><br>function GetHzPyFull(HzChar: String): String;<br>var<br>&nbsp; i, len: Integer;<br>&nbsp; Py: String;<br>&nbsp; function IsDouByte(C: Char): Boolean;<br>&nbsp; begin<br>&nbsp; &nbsp; Result := C &gt;= #129;<br>&nbsp; end;<br>begin<br>&nbsp; Result := '';<br>&nbsp; i := 1;<br>&nbsp; while i &lt;= Length(HzChar) do<br>&nbsp; begin<br>&nbsp; &nbsp; if IsDouByte(HzChar) and (Length(HzChar) - i &gt; 0) then<br>&nbsp; &nbsp; &nbsp; len := 2<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; len := 1;<br>&nbsp; &nbsp; Py := GetHzPy(@HzChar, len);<br>&nbsp; &nbsp; Inc(i, len);<br>&nbsp; &nbsp; if (Result &lt;&gt; '') and (Py &lt;&gt; '') then<br>&nbsp; &nbsp; &nbsp; Result := Result + ' ' + Py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // + ' '<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; Result := Result + Py;<br>&nbsp; end;<br>end;<br><br>function GetHzPyHead(HzChar: PChar; Len: Integer): String;<br>begin<br>&nbsp; Result := Copy(GetHzPy(HzChar, Len), 1, 1);<br>end;<br><br>function GetPyChars(HzChar: String): String;<br>var<br>&nbsp; i, len: Integer;<br>&nbsp; Py: String;<br>&nbsp; function IsDouByte(C: Char): Boolean;<br>&nbsp; begin<br>&nbsp; &nbsp; Result := C &gt;= #129;<br>&nbsp; end;<br>begin<br>&nbsp; Result := '';<br>&nbsp; i := 1;<br>&nbsp; while i &lt;= Length(HzChar) do<br>&nbsp; begin<br>&nbsp; &nbsp; if IsDouByte(HzChar) and (Length(HzChar) - i &gt; 0) then<br>&nbsp; &nbsp; &nbsp; len := 2<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; len := 1;<br>&nbsp; &nbsp; Py := GetHzPyHead(@HzChar, len);<br>&nbsp; &nbsp; Inc(i, len);<br>&nbsp; &nbsp; Result := Result + Py;<br>&nbsp; end;<br>end;<br><br>{ THzSpell }<br><br>function THzSpell.GetHzSpell: String;<br>begin<br>&nbsp; if FSpell = '' then<br>&nbsp; begin<br>&nbsp; &nbsp; Result := GetHzPyFull(FHzText);<br>&nbsp; &nbsp; FSpell := Result;<br>&nbsp; end<br>&nbsp; else Result := FSpell;<br>end;<br><br>function THzSpell.GetPyHead: String;<br>begin<br>&nbsp; if FSpellH = '' then<br>&nbsp; begin<br>&nbsp; &nbsp; Result := GetPyChars(FHzText);<br>&nbsp; &nbsp; FSpellH := Result;<br>&nbsp; end<br>&nbsp; else Result := FSpellH;<br>end;<br><br>class function THzSpell.PyHeadOfHz(Hz: String): String;<br>begin<br>&nbsp; Result := GetPyChars(Hz);<br>end;<br><br>class function THzSpell.PyOfHz(Hz: String): String;<br>begin<br>&nbsp; Result := GetHzPyFull(Hz);<br>end;<br><br>procedure THzSpell.SetHzText(const Value: String);<br>begin<br>&nbsp; FHzText := Value;<br>&nbsp; FSpell := '';<br>&nbsp; FSpellH := '';<br>end;<br><br>end.<br>&nbsp;
 
可以使用控件阿,<br>很方便的
 
zhyanfeng: &nbsp;把HzSpDat2.inc也贴上来看看
 
你的email是多少,这里贴不上,我email给你吧<br>我的是ltzyf@21cn.com
 
To zhyanfeng<br>给我一份学习学习呗!(整个程序)谢谢!Mail To wslsoftware@163.com
 
给你一段程序,不是我写的。<br><br>unit hztopy;//汉字to拼音<br><br>interface<br>uses Windows, Messages, SysUtils, Classes, Forms,<br>&nbsp; Controls, ComCtrls, CommCtrl, DsgnIntf, dialogs;<br><br>function GetPYIndexChar(hzchar: string): string; //返回一个汉字的拼音首字符<br>function getpy(hzstring: string): string; //返回一个汉字串的拼单首字符串<br>function SearchByPYIndexStr(SourceStrs: TStrings; PYIndexStr: string): string; //从Tstrings 中找到所有拼音首字符串中有PYindexstr的字符串<br><br>implementation<br><br>function getpy(hzstring: string): string;<br>var<br>&nbsp; i: integer;<br>&nbsp; str: array[1..255] of string;<br>&nbsp; hz: string;<br>&nbsp; hzstr: string;<br>begin<br>&nbsp; hzstr := hzstring;<br>&nbsp; i := 0;<br>&nbsp; while hzstr &lt;&gt; '' do<br>&nbsp; begin<br>&nbsp; &nbsp; if (ord(hzstr[1]) &gt;= 33) and (ord(hzstr[1]) &lt;= 126) then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; str := copy(hzstr, 0, 1);<br>&nbsp; &nbsp; &nbsp; hzstr := copy(hzstr, 2, length(hzstr) - 1);<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; else if ord(hzstr[1]) &gt; 127 then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; hz := copy(hzstr, 0, 2);<br>&nbsp; &nbsp; &nbsp; hzstr := copy(hzstr, 3, length(hzstr) - 2);<br>&nbsp; &nbsp; &nbsp; str := getpyindexchar(hz);<br>&nbsp; &nbsp; end;<br>&nbsp; &nbsp; if result = '' then result := str<br>&nbsp; &nbsp; else result := result + str;<br>&nbsp; &nbsp; i := i + 1;<br>&nbsp; end;<br>end;<br><br>function GetPYIndexChar(hzchar: string): string;<br>begin<br>&nbsp; case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of<br>&nbsp; &nbsp; $B0A1..$B0C4: result := 'A';<br>&nbsp; &nbsp; $B0C5..$B2C0: result := 'B';<br>&nbsp; &nbsp; $B2C1..$B4ED: result := 'C';<br>&nbsp; &nbsp; $B4EE..$B6E9: result := 'D';<br>&nbsp; &nbsp; $B6EA..$B7A1: result := 'E';<br>&nbsp; &nbsp; $B7A2..$B8C0: result := 'F';<br>&nbsp; &nbsp; $B8C1..$B9FD: result := 'G';<br>&nbsp; &nbsp; $B9FE..$BBF6: result := 'H';<br>&nbsp; &nbsp; $BBF7..$BFA5: result := 'J';<br>&nbsp; &nbsp; $BFA6..$C0AB: result := 'K';<br>&nbsp; &nbsp; $C0AC..$C2E7: result := 'L';<br>&nbsp; &nbsp; $C2E8..$C4C2: result := 'M';<br>&nbsp; &nbsp; $C4C3..$C5B5: result := 'N';<br>&nbsp; &nbsp; $C5B6..$C5BD: result := 'O';<br>&nbsp; &nbsp; $C5BE..$C6D9: result := 'P';<br>&nbsp; &nbsp; $C6DA..$C8BA: result := 'Q';<br>&nbsp; &nbsp; $C8BB..$C8F5: result := 'R';<br>&nbsp; &nbsp; $C8F6..$CBF9: result := 'S';<br>&nbsp; &nbsp; $CBFA..$CDD9: result := 'T';<br>&nbsp; &nbsp; $CDDA..$CEF3: result := 'W';<br>&nbsp; &nbsp; $CEF4..$D1B8: result := 'X';<br>&nbsp; &nbsp; $D1B9..$D4D0: result := 'Y';<br>&nbsp; &nbsp; $D4D1..$D7F9: result := 'Z';<br>&nbsp; else<br>&nbsp; &nbsp; result := char(0);<br>&nbsp; end;<br>end;<br><br>function SearchByPYIndexStr(SourceStrs: TStrings; PYIndexStr: string): string;<br>label NotFound;<br>var<br>&nbsp; i, j: integer;<br>&nbsp; hzchar: string;<br>begin<br>&nbsp; for i := 0 to SourceStrs.Count - 1 do<br>&nbsp; begin<br>&nbsp; &nbsp; for j := 1 to Length(PYIndexStr) do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; hzchar := SourceStrs[2 * j - 1]<br>&nbsp; &nbsp; &nbsp; &nbsp; + SourceStrs[2 * j];<br>&nbsp; &nbsp; &nbsp; if (PYIndexStr[j] &lt;&gt; '?') and<br>&nbsp; &nbsp; &nbsp; &nbsp; (UpperCase(PYIndexStr[j]) &lt;&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; GetPYIndexChar(hzchar)) then goto NotFound;<br>&nbsp; &nbsp; end;<br>&nbsp; &nbsp; if result = '' then result := SourceStrs<br>&nbsp; &nbsp; else result := result + Char(13) + SourceStrs;<br>&nbsp; &nbsp; NotFound:<br>&nbsp; end;<br>end;<br><br>end.<br><br>&nbsp;<br>&nbsp;<br>来自:westboy2000, 时间:2001-10-25 19:10:00, ID:690342 <br>上面有一行写错了,改正如下:<br>&nbsp; &nbsp; $CEF4..$D1B8: result := 'X';<br>
 
我有一个现成的.在5.0下已试过,很好.<br>&nbsp; 你看一下.<br>unit MainFrm;<br><br>interface<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br>&nbsp; StdCtrls;<br><br>type<br>&nbsp; TMainForm = class(TForm)<br>&nbsp; &nbsp; ChineseEdt: TEdit;<br>&nbsp; &nbsp; PYEdt: TEdit;<br>&nbsp; &nbsp; btnConvert: TButton;<br>&nbsp; &nbsp; Label1: TLabel;<br>&nbsp; &nbsp; Label2: TLabel;<br>&nbsp; &nbsp; Label3: TLabel;<br>&nbsp; &nbsp; Label4: TLabel;<br>&nbsp; &nbsp; Label5: TLabel;<br>&nbsp; &nbsp; Label6: TLabel;<br>&nbsp; &nbsp; procedure btnConvertClick(Sender: TObject);<br>&nbsp; private<br>&nbsp; &nbsp; { Private declarations }<br>&nbsp; public<br>&nbsp; &nbsp; { Public declarations }<br>&nbsp; end;<br><br>var<br>&nbsp; MainForm: TMainForm;<br><br>implementation<br><br>{$R *.DFM}<br><br>// 获取指定汉字的拼音索引字母,如:“汉”的索引字母是“H”<br>function GetPYIndexChar( hzchar:string):char;<br>begin<br>&nbsp; case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of<br>&nbsp; &nbsp; $B0A1..$B0C4 : result := 'A';<br>&nbsp; &nbsp; $B0C5..$B2C0 : result := 'B';<br>&nbsp; &nbsp; $B2C1..$B4ED : result := 'C';<br>&nbsp; &nbsp; $B4EE..$B6E9 : result := 'D';<br>&nbsp; &nbsp; $B6EA..$B7A1 : result := 'E';<br>&nbsp; &nbsp; $B7A2..$B8C0 : result := 'F';<br>&nbsp; &nbsp; $B8C1..$B9FD : result := 'G';<br>&nbsp; &nbsp; $B9FE..$BBF6 : result := 'H';<br>&nbsp; &nbsp; $BBF7..$BFA5 : result := 'J';<br>&nbsp; &nbsp; $BFA6..$C0AB : result := 'K';<br>&nbsp; &nbsp; $C0AC..$C2E7 : result := 'L';<br>&nbsp; &nbsp; $C2E8..$C4C2 : result := 'M';<br>&nbsp; &nbsp; $C4C3..$C5B5 : result := 'N';<br>&nbsp; &nbsp; $C5B6..$C5BD : result := 'O';<br>&nbsp; &nbsp; $C5BE..$C6D9 : result := 'P';<br>&nbsp; &nbsp; $C6DA..$C8BA : result := 'Q';<br>&nbsp; &nbsp; $C8BB..$C8F5 : result := 'R';<br>&nbsp; &nbsp; $C8F6..$CBF9 : result := 'S';<br>&nbsp; &nbsp; $CBFA..$CDD9 : result := 'T';<br>&nbsp; &nbsp; $CDDA..$CEF3 : result := 'W';<br>&nbsp; &nbsp; $CEF4..$D188 : result := 'X';<br>&nbsp; &nbsp; $D1B9..$D4D0 : result := 'Y';<br>&nbsp; &nbsp; $D4D1..$D7F9 : result := 'Z';<br>&nbsp; else<br>&nbsp; &nbsp; result := char(32);<br>&nbsp; end;<br>end;<br><br>procedure TMainForm.btnConvertClick(Sender: TObject);<br>var<br>&nbsp; I: Integer;<br>&nbsp; PY: string;<br>&nbsp; s: string;<br>begin<br>&nbsp; s := '' ;<br>&nbsp; I := 1;<br>&nbsp; while I &lt;= Length(ChineseEdt.Text) do<br>&nbsp; begin<br>&nbsp; &nbsp; PY := Copy(ChineseEdt.Text, I , 1);<br>&nbsp; &nbsp; if PY &gt;= Chr(128) then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; Inc(I);<br>&nbsp; &nbsp; &nbsp; PY := PY + Copy(ChineseEdt.Text, I , 1);<br>&nbsp; &nbsp; &nbsp; s := s + GetPYIndexChar(PY);<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; s := s + PY;<br>&nbsp; &nbsp; Inc(I);<br>&nbsp; end;<br>&nbsp; PYEdt.Text := s;<br>end;<br><br>end.<br>
 
认的汉字2万多个,拼音500多个...........<br>读一下这贴:<br>http://www.playicq.com/dispdoc.php?t=&amp;id=1734<br><br>
 
我给你一个现成的<br>unit MainFrm;<br><br>interface<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br>&nbsp; StdCtrls;<br><br>type<br>&nbsp; TMainForm = class(TForm)<br>&nbsp; &nbsp; ChineseEdt: TEdit;<br>&nbsp; &nbsp; PYEdt: TEdit;<br>&nbsp; &nbsp; btnConvert: TButton;<br>&nbsp; &nbsp; Label1: TLabel;<br>&nbsp; &nbsp; Label2: TLabel;<br>&nbsp; &nbsp; Label3: TLabel;<br>&nbsp; &nbsp; Label4: TLabel;<br>&nbsp; &nbsp; Label5: TLabel;<br>&nbsp; &nbsp; Label6: TLabel;<br>&nbsp; &nbsp; procedure btnConvertClick(Sender: TObject);<br>&nbsp; private<br>&nbsp; &nbsp; { Private declarations }<br>&nbsp; public<br>&nbsp; &nbsp; { Public declarations }<br>&nbsp; end;<br><br>var<br>&nbsp; MainForm: TMainForm;<br><br>implementation<br><br>{$R *.DFM}<br><br>// 获取指定汉字的拼音索引字母,如:“汉”的索引字母是“H”<br>function GetPYIndexChar( hzchar:string):char;<br>begin<br>&nbsp; case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of<br>&nbsp; &nbsp; $B0A1..$B0C4 : result := 'A';<br>&nbsp; &nbsp; $B0C5..$B2C0 : result := 'B';<br>&nbsp; &nbsp; $B2C1..$B4ED : result := 'C';<br>&nbsp; &nbsp; $B4EE..$B6E9 : result := 'D';<br>&nbsp; &nbsp; $B6EA..$B7A1 : result := 'E';<br>&nbsp; &nbsp; $B7A2..$B8C0 : result := 'F';<br>&nbsp; &nbsp; $B8C1..$B9FD : result := 'G';<br>&nbsp; &nbsp; $B9FE..$BBF6 : result := 'H';<br>&nbsp; &nbsp; $BBF7..$BFA5 : result := 'J';<br>&nbsp; &nbsp; $BFA6..$C0AB : result := 'K';<br>&nbsp; &nbsp; $C0AC..$C2E7 : result := 'L';<br>&nbsp; &nbsp; $C2E8..$C4C2 : result := 'M';<br>&nbsp; &nbsp; $C4C3..$C5B5 : result := 'N';<br>&nbsp; &nbsp; $C5B6..$C5BD : result := 'O';<br>&nbsp; &nbsp; $C5BE..$C6D9 : result := 'P';<br>&nbsp; &nbsp; $C6DA..$C8BA : result := 'Q';<br>&nbsp; &nbsp; $C8BB..$C8F5 : result := 'R';<br>&nbsp; &nbsp; $C8F6..$CBF9 : result := 'S';<br>&nbsp; &nbsp; $CBFA..$CDD9 : result := 'T';<br>&nbsp; &nbsp; $CDDA..$CEF3 : result := 'W';<br>&nbsp; &nbsp; $CEF4..$D188 : result := 'X';<br>&nbsp; &nbsp; $D1B9..$D4D0 : result := 'Y';<br>&nbsp; &nbsp; $D4D1..$D7F9 : result := 'Z';<br>&nbsp; else<br>&nbsp; &nbsp; result := char(32);<br>&nbsp; end;<br>end;<br><br>procedure TMainForm.btnConvertClick(Sender: TObject);<br>var<br>&nbsp; I: Integer;<br>&nbsp; PY: string;<br>&nbsp; s: string;<br>begin<br>&nbsp; s := '' ;<br>&nbsp; I := 1;<br>&nbsp; while I &lt;= Length(ChineseEdt.Text) do<br>&nbsp; begin<br>&nbsp; &nbsp; PY := Copy(ChineseEdt.Text, I , 1);<br>&nbsp; &nbsp; if PY &gt;= Chr(128) then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; Inc(I);<br>&nbsp; &nbsp; &nbsp; PY := PY + Copy(ChineseEdt.Text, I , 1);<br>&nbsp; &nbsp; &nbsp; s := s + GetPYIndexChar(PY);<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; s := s + PY;<br>&nbsp; &nbsp; Inc(I);<br>&nbsp; end;<br>&nbsp; PYEdt.Text := s;<br>end;<br><br>end.
 
后退
顶部