W
wqhatnet
Unregistered / Unconfirmed
GUEST, unregistred user!
乐乐
这两个汉字为什么会取不到呢?
function GetPinYinFirstLetter(HZChar: string): Char;
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 := 'K';
$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 := ' ';
// Result := Char(0);
end;
end;
这两个汉字为什么会取不到呢?
function GetPinYinFirstLetter(HZChar: string): Char;
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 := 'K';
$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 := ' ';
// Result := Char(0);
end;
end;