不再向个别人员发送邮件,公布完全实用的程序好了。
需要微软简繁汉字拼音的请特别发邮件说明:索取微软
拼音首字母程序(或首字母库)。
相信大部分使用国标拼音字母已经足够了。
至于多音字实在没有解决的可能,实际上更加没有解决的
意义,更主要是没有解决的价值。
汉字拼音转换过程(附带国标拼音首字母):
var
ExePath: string;//执行文件目录
PYCode: string;
HZ0001: string
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +
'1234567890~!@#$%^&*()-+=/|/?<><>"""''[]{}:;,..';
HZ0002: WideString
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +
'abcdefghijklmnopqrstuvwxyz' +
'1234567890~!@#$%^&*()-+=\|' +
'/?<>《》“”"'[]{}:;,.。';
function ReadGBPYFromFile: string;
var
TS: TStringList;
begin
ExePath := ExtractFilePath(ParamStr(0));
TS := TStringList.Create;
TS.LoadFromFile(ExePath + 'GBPYCode.DAT');
Result := TS.Text;
TS.Free;
end;
function GetGBPYStr(HZ: WideString): string;
var
n, i: integer;
C: Char;
PYStr: string;
D: string;
P, Q, W: integer;
PCStr: Char;
begin
if GBPYCode = '' then
GBPYCode := ReadGBPYFromFile;
PYStr := '';
for i := 1 to Length(HZ)do
begin
C := string(HZ)[1];
//取 ASCII 码判断是否汉字
if C < #128 then
begin
PCStr := UpperCase(HZ)[1];
end else
begin
D := string(HZ);
P := Pos(D, hz0002);
if P > 0 then
begin
PCStr := HZ0001[P];
end else
begin
Q := Ord(D[1]) - 176;
W := Ord(D[2]) - 160;
if (Q < 0) or (W <= 0) then
PCStr := '?' else
try
N := Q * 94 + W;
PCStr := GBPYCode[N];
except
PCStr := '?';
//非汉字的那些符号
end;
end;
end;
PYStr := PYStr + PCStr;
end;
result := PYStr;
end;
//国标拼音首字母文件:GBPYCode.DAT 内容(长文本文件)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBPBBBBBBBBBBBBBBBBBBBBB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