RSS|Ͷ
λãվҳ > ַ >

Delphi תƴ,ֶһת

ߣadmin Դ ڣ2018/3/12 22:24:36 ǩ

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Buttons, Vcl.StdCtrls;

type
  TForm1 = class(TForm)
    SpeedButton1: TSpeedButton;
    Edit1: TEdit;
    Edit2: TEdit;
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
Function GetPinyin_shoupinma2(hz: String): ansiChar;//ȡƧƴ
begin
  case hz[1] of
    '': Result := 'A';
    '': Result := 'A';
    '': Result := 'A';
    '': Result := 'B';
    '': Result := 'B';
    '': Result := 'B';
    '': Result := 'B';
    '': Result := 'B';
    '': Result := 'B';
    '': Result := 'C';
    '': Result := 'C';
    '': Result := 'D';
    '': Result := 'D';
    '': Result := 'D';
    '߰': Result := 'D';
    '': Result := 'D';
    '': Result := 'D';
    '': Result := 'D';
    '': Result := 'D';
    'ݭ': Result := 'E';
    '߻': Result := 'F';
    '': Result := 'F';
    '': Result := 'G';
    '': Result := 'G';
    '': Result := 'G';
    '': Result := 'G';
    '': Result := 'G';
    '': Result := 'G';
    '': Result := 'G';
    '': Result := 'H';
    'ڭ': Result := 'H';
    '': Result := 'H';
    '': Result := 'H';
    '': Result := 'H';
    '': Result := 'H';
    '޽': Result := 'H';
    '': Result := 'J';
    '': Result := 'J';
    '': Result := 'J';
    '': Result := 'J';
    '': Result := 'K';
    '': Result := 'K';
    '': Result := 'L';
    '': Result := 'L';
    '': Result := 'L';
    '': Result := 'L';
    'ޤ': Result := 'L';
    '': Result := 'L';
    '': Result := 'L';
    '': Result := 'L';
    'ݹ': Result := 'L';
    '': Result := 'L';
    '': Result := 'M';
    '': Result := 'M';
    '': Result := 'M';
    'ݮ': Result := 'M';
    '': Result := 'M';
    '': Result := 'M';
    '': Result := 'M';
    '': Result := 'N';
    '': Result := 'N';
    '': Result := 'N';
    '': Result := 'P';
    '': Result := 'P';
    '': Result := 'P';
    '': Result := 'P';
    '': Result := 'P';
    '': Result := 'P';
    '': Result := 'P';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'Q';
    '': Result := 'R';
    '': Result := 'S';
    '': Result := 'S';
    //'': Result := 'S';
    '': Result := 'S';
    '': Result := 'S';
    '': Result := 'T';
    '٢': Result := 'T';
    '': Result := 'W';
    '': Result := 'X';
    //'': Result := 'X';
    '': Result := 'X';
    '': Result := 'X';
    '': Result := 'X';
    '': Result := 'X';
    '': Result := 'X';
    'ܰ': Result := 'X';
    'ܺ': Result := 'X';
    '': Result := 'X';
    '': Result := 'Y';
    '': Result := 'Y';
    '': Result := 'Y';
    '': Result := 'Y';
    '': Result := 'Y';
    '': Result := 'Y';
    '': Result := 'Z';
    //'': Result := 'Z';
    '': Result := 'Z';
    '': Result := 'Z';
    '': Result := 'Z';
    '': Result := 'Z';
    //'': Result := 'Z';
    '': Result := 'Z';
    '': Result := 'Z';
    '': Result := 'D';
    '': Result := 'Z';
    '': Result := 'B';
    '': Result := 'B';
    'f': Result := 'E';
    'ܽ': Result := 'F';
    'h': Result := 'J';
    '': Result := 'J';
    '': Result := 'P';
    '': Result := 'S';
    'q': Result := 'T';
    '': Result := 'Y';
    '': Result := 'Z';
    'Y': Result := 'Z';
    '': Result := 'Z';
    '': Result := 'Z';


    '߹', '', '', '', '', '', '', '', '', '', '', '', {'',}
    '', '', '', '', {'',} '', '', '', '', '', '', '', '',
    ''{, ''}, '', '', '', '', '', ''{, ''}:
    Result := 'a';

    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', ''{, ''}, '', '', ''{, ''}, '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', 'ݩ', 'ذ'{, ''}, '', '', '', '', '', '', '', ''{,
    ''}, '', ''{, ''}, '', '', '', '', '', '', '', '', '',
    '޵', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', ''{, ''}, '', '', '', '', '', '', '', '',
    '', '', '', '', '', ''{, ''}, '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', ''{, ''}, '', '', '', '', '߲', '', '', '', '', '':
    Result := 'b';

    '', '', '', '', '', '', '', '', '', '', '', 'ܳ', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '٭', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', 'ة',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', 'ܯ', '', ''{, ''}, '', '', '߳', '', '', '',
    '', '', '', '', '', '', '', '', '', 'ٱ', '', '', '',
    '', 'ۻ', '', '', '', '', '', 'ء', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', 'ݻ', '', '', '', '', '', '', '', '', ''{, ''}, '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', 'ߥ', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '':
    Result := 'c';

    '', '', '', '', '', '', '', '', '', ''{, '߰'}, '', '',
    '', 'ܤ'{, ''}, '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', ''{, ''}, '߶', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', 'ݶ', '', 'ص', 'ڮ', 'ۡ',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', ''{, ''}, '', '', '', '', '', '', 'ܦ', '',
    '', '', '', '', '', '', '', ''{, ''}{, ''}, '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', ''{, ''},
    '', '', '', '', '', '', '', 'ܶ', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', ''{,
    ''}, '', '', '', '', '', '', '', '', '', 'ؼ':
    Result := 'd';

    ''{, 'ݭ'}, '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', 'ج', '', '', '', '', '', '', '', '', '٦',
    '', '', '':
    Result := 'e';

    '', '', '', 'ެ', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', 'ۺ',
    '', 'ٺ', ''{, '߻'}, '', '', '', '', '', ''{, 'ܽ'}, '', '',
    '', '', '', '', ''{{, ''}, 'ۮ', '', 'ݳ', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '':
    Result := 'f';

    '', '٤', '', '', '', '', '', '', '', 'ؤ', '', '', ''{,
    ''}, '', '', '', '', '', 'ߦ', '', '', '', '', '', '',
    '', '', 'غ', '', '', '', '޻', 'ھ', '۬', '', '', '', '',
    'ت', '', 'ܪ', ''{, ''}, '', '', '', '', '', '', '', 'ب',
    '', 'ݢ', '', '', '', '', '', '', '', '', '', '', '',
    '', ''{, ''}, '', 'ڸ', '', '', '', '', '', '', '', '',
    '', '', '', '', '', 'ڬ', '', ''{, ''}, '', '', '', '',
    '', '', '', '', ''{, ''}, ''{, ''}, '', 'ڴ', '', '', '',
    '', '', '', '', ''{, ''}, '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', 'ݸ', '':
    Result := 'g';

    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '޶', '', '', '', '', '',
    '', ''{, 'ڭ'}, '', '', '', '', '', '', '', '', '', '',
    '޿', '', 'ް', '', '', 'ݦ', 'ޮ', '', 'ڧ', '', '', '', '',
    '', '', 'ܩ', '', '', '', '', '', '', '', ''{, ''}, '',
    '', '', '', '', '', ''{, ''}, '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', 'ۼ', '', '', '', '', 'ߧ', '', '', '', '', '', '',
    '', ''{, ''}, '', '', 'ڶ', '', '', '', '', '', '', ''{,
    ''}, '', ''{, ''}, '', '', '', '', 'ޥ', '', '', '', 'ڻ',
    '', '', '', '', '߫', '', '', '', ''{, '޽'}, '', '', '',
    '':
    Result := 'h';

    #0: Result := 'i';

    'آ', 'ߴ', '', '', 'ܸ', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', 'ؽ', '٥', '', '', '', '',
    '', '', 'ު', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', 'ۣ', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', 'ܴ', '',
    '', '', '', '', '', '', 'ٮ', '', '', '', '', '', '',
    '', '', '', '', 'ڦ', 'ڵ', '', '', '', '', '', '', ''{,
    ''}, '', '', '', '', '', '', '', ''{, ''}, '', '', 'ݣ',
    '', '', '', '', '', '', 'ݼ', '', '', ''{, ''}, '', '',
    '', '', ''{, ''}, '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', 'ާ', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', 'ڪ',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '۲':
    Result := 'j';

    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '٩', 'ݨ', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', 'ߵ', '',
    'ޢ', '', 'ܥ', '', '', '', '٨', '', 'ۦ', '', '', '', '',
    'ڲ', '', 'ڿ', '', '', '', '', '', '', '', 'ظ'{, ''}, '',
    '', '', '', '', ''{, ''}, '', '', '', '', '', '', '',
    '', '', '', '', '', '', '':
    Result := 'k';

    ''{, ''}, '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', ''{, 'ݹ'}, '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '߷', '', '', ''{, ''}, '', '', '', 'ڳ', '', '', 'ܨ', '',
    '', '', '', '', '', '', '', '', '', '޼', '', '', 'ٵ',
    '', '', '', '', '', '', '߿', '', '', '', '', '', 'ٳ',
    '', '', '', '۪', '', '', 'ݰ', '', '', ''{, ''}, '', '',
    '', '', '', '', '', '', '', ''{, ''}, '', '', '', '',
    '', '', '', '', 'ܮ', '', '', '', '', '', '', '', ''{,
    'ޤ'}, '', '', '', '', '', '', '', '', ''{, ''}, '', '',
    '', '', '', '', '', '', '', ''{, ''}, '', '', ''{, ''},
    '', '', '', '', '', '', '', '', '۹', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', ''{,
    ''}, '', ''{, ''}, '', '', '', '', '', '', '', '', '',
    'ߣ', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '':
    Result := 'l';

    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '߼', ''{, ''}, '',
    '', '', '', 'ݤ', '۽', '', ''{, ''}, '', 'ܬ', '', '', '',
    '', '', '', '', '', '', '', '', ''{, ''}, '', '', '',
    '', '', '', '', '', '', ''{, 'ݮ'}, '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', 'ޫ', '', '',
    '', '', '', '', '', ''{, ''}, '', '', '', '', '', '',
    '', '', '', '', '', '', ''{, ''}, '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', 'ڤ', '', '', '', '', '',
    '', '', '', '', ''{, ''}, '', '', '', '', '', '', '',
    '', 'ٰ', '', '', '', '', '', '', '', '', '':
    Result := 'm';

    '', '', 'ؿ', '', '', '', '', 'ܵ', ''{, ''}, 'ؾ', ''{, ''},
    '', '', '', '', '', '', '', '߭', 'ث', '', '', '', '',
    '', '', '', 'ګ', '', '', '', '', '', '٣', '', '', '',
    '', '', '', '', 'إ', '', '', '', ''{, ''}, '', '', '',
    '', '', '', '', '', '', '', '', '', '', 'ٯ', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '':
    Result := 'n';

    '', 'ک', '', '', '':
    Result := 'o';

    '', '', '', 'ڢ', ''{, ''}, '', 'ٽ'{, ''}, '', '', '', ''{,
    ''}, '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', 'ܡ', '', 'ا', '', '', '',
    '', ''{, ''}, '', 'ۯ', '', '', '', '', '', 'ܱ', '', '',
    '', 'ߨ'{, ''}, '', '', '', '', '', '', '', '', '', '',
    '', ''{, ''}, '', ''{, ''}, '', '', 'د', '', '', '', '',
    '', '', '', 'ٷ', '', '', '', '۶', '', '', '', ''{, ''},
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '':
    Result := 'p';

    '', '', '', '', ''{, ''}, '', '', '', '', '', '', '',
    ''{, ''}, '', '', '', 'ݽ', '', '', '', '', '', '', '',
    'ޭ', '', '', '', 'ܻ'{, ''}, '', '', '', '', '', '', '',
    '', '', '', 'ܷ', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', 'ٻ', '', '', '', '', '',
    '', '', '', '', ''{, ''}, '', '', '', '', '', ''{, ''},
    '', '', '', '', '', 'ڽ', '', '', '', '', '', ''{, ''}{,
    ''}, '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', 'ٴ', '', ''{, ''}, '', '', '', '', '',
    '', 'ڰ'{, ''}, '', '', '', '۾', '', '', 'ޡ', '', '', '޾',
    '', '', '', '', '', '', '', 'ڹ', '', '', '', '', '',
    '', '', '', '', '', '', '', 'ۧ'{, ''}:
    Result := 'q';

    ''{, ''}, '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '޸',
    '', '', '', '', '', '', '', 'ި', '', '', '', '', 'ټ',
    '':
    Result := 'r';

    '', '', 'ح', '', '', '', 'ئ', '', ''{, ''}, '', '', '',
    '', '', '', '', '', '', 'ܣ', '', '', '', '', ''{, ''},
    ''{, ''}, '', '', '', '', '', '', '', '', '', '', '',
    '', 'ڨ', '', '', '۷', '', '', '', '', '', '', '', '',
    '', '', '', 'ۿ', '', '', '', '', '', ''{, ''}, 'ڷ', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', 'ݪ', '', '', '', '', '', '', '', '߱', '',
    '', '', '', '', '', '', '', '', 'ٿ', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', 'ٹ', '', '', '', 'ڡ', '', '', 'ݿ', '',
    '', '', '', 'ݥ', '', '', '', '', ''{, ''}{, ''}, '', '',
    '', '', 'ݷ', '', '', '', '', '', '', '', '', '', '',
    '', '޴', '', '', '', '', '', '', '', '', '', '', 'ݴ',
    '', '', '', '':
    Result := 's';

    '', '߾', '', '', '', '', '', '', '', '', '', '', '',
    '', '', 'ۢ', '', '', '', '޷'{, ''}, '', '', '۰', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', 'ػ', '', '߯', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '٬',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '١', '', '', '', '', '', '', 'ݱ',
    '', '', 'ܢ', '', '', '', '', '', '', '', ''{, ''}, 'ر'{,
    '٢'}, '', '', '', '', '', '', '', '', '', '', '':
    Result := 't';

    '', '', '', '', '', '', '', '', 'ܹ', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', 'ޱ', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '޳', '',
    'ݫ', ''{, ''}, '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', 'أ', '', '', '', '', '',
    '', '', '', '', '':
    Result := 'w';

    'ۨ', '', '', 'ݡ', '', '', '', 'ۭ', '', '', '', '', '',
    'ݾ', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    'ݲ', ''{, ''}, '', '', '', '', '', '', '', '', '', '޺',
    '', '', '', '', 'ܼ', '', '', '', '', '', '', '', '',
    '', '', '', '', ''{, ''}, '', '', '', '', '', '', '',
    'ߢ'{, ''}, 'ަ', '', '', '', '', '', '', '', 'ޯ', '', '',
    '', '', '', ''{, 'ܰ'}{, ''}, 'ض', '', '', 'ߩ', '', ''{, 'ܺ'},
    '', '', '', '', '', '', ''{, ''}, '', '', '', 'ڼ', '',
    ''{, ''}, '', '', '', '', 'ޣ', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', ''{, ''},
    '', '', '', '', '޹', '', '', '', '', '', '', '', '',
    '', '':
    Result := 'x';

    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '۳', '', 'ڥ', ''{, ''}, 'ܾ',
    '', '', '', 'ٲ', '', '', '۱', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', 'ز', 'ߺ', 'س', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', 'ڱ'{, ''}, '', '', '', '', '', '', '',
    '', '', '', '', '', '', '߮', '', '', '', '߽', '٫', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '޲'{, ''}, '', '', 'ܲ', '', '', '', '',
    'ܧ', '', '', '۴', ''{, ''}, ''{, ''}, '', '', '', 'ط', 'ݺ',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '۫', '', '', '', '', '', 'ܭ', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', 'ٸ', '', '', '', '', 'ݯ', 'ݵ', '', '', '', '',
    '', 'ݬ', '', '', '', '٧', '', '', '', '', '', '', '',
    '', '', 'خ', '', '', '', '', '', 'ٶ', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', 'ع',
    '', '', '', '', '', '', '', '', '', '', 'ܫ'{, ''}, '',
    '', '', '', '', '', '', '', '', '', '', 'ܿ', '', '',
    '', '', '۩', '', '', '', '':
    Result := 'y';

    '', '', '', '', 'ߪ', '', '', '', '', '', '', '', '',
    '', ''{, ''}, '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '۸', '', ''{, ''}, '',
    '', ''{, ''}, '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '߸', '', ''{, ''}, '', '', '', '', '', '', '',
    '', '', '', '۵', '', '', ''{, ''}, '', '', '', '', '',
    'گ', '', '', '', '', '', 'ߡ', ''{, ''}, '', '', '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', 'ں', 'ش'{, ''}, '', '', '', ''{,
    ''}, '', '', '', '', '', '', '', ''{, ''}, '', '', '',
    'ۤ', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', 'ڣ', '', '', '', '', '', '', 'ݧ',
    '', '', '٪', 'ۥ', '', '', '', '', '', ''{, ''}, '', '',
    '', '', '', '', '', '', '', '', '', '', '', '', '',
    '', '', '', '', '', '', '', 'پ', '', '', '', '', '',
    '', '', '߬', 'ީ', '', '', 'ߤ', '', '', '', ''{, ''}:
    Result := 'z';
  end;
end;

Function Getpinyin_shoupinma(hzchar: Ansistring): ansichar; //óƴ
var
  i: Integer;
begin
  case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of
    $B0A1..$B0C4 : Result := 'A';
    $B0C5..$B2C0 : Result := 'B';
    $B2C1..$B4ED : Result := 'C';
    $B4EE..$B6E9 : Result := 'D';
    $B6EA..$B7A1 : Result := 'E';
    $B7A2..$B8C0 : Result := 'F';
    $B8C1..$B9FD : Result := 'G';
    $B9FE..$BBF6 : Result := 'H';
    $BBF7..$BFA5 : Result := 'J';
    $BFA6..$C0AB : Result := 'K';
    $C0AC..$C2E7 : Result := 'L';
    $C2E8..$C4C2 : Result := 'M';
    $C4C3..$C5B5 : Result := 'N';
    $C5B6..$C5BD : Result := 'O';
    $C5BE..$C6D9 : Result := 'P';
    $C6DA..$C8BA : Result := 'Q';
    $C8BB..$C8F5 : Result := 'R';
    $C8F6..$CBF9 : Result := 'S';
    $CBFA..$CDD9 : Result := 'T';
    $CDDA..$CEF3 : Result := 'W';
    $CEF4..$D188 : Result := 'X';
    $D1B9..$D4D0 : Result := 'Y';
    $D4D1..$D7F9 : Result := 'Z';
    else Result := GetPinyin_shoupinma2(hzchar);
  end;
end;
Function HZToPY(cSTR:String):String;
 Var
   i:integer;
   S:String;
  begin
   Result:='';
    for I := 1 to Length(cSTR) do
       begin
          S:=Copy(cSTR,i,1);
         if Trim(Getpinyin_shoupinma(S))='' then
            Result:=Result+S
            else
          Result:=Result+Getpinyin_shoupinma(S);
       end;
  end;

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
 Edit2.Text:=HZToPY(Edit1.Text);
end;

end.

磺"" תΪNS

     "a1" תΪNa1S

ƪºΣ
0
0
0
0
0
0
0
0
ַ
һƪû