Delphi 显示英语国际音标的问题

来源:百度知道 编辑:UC知道 时间:2024/07/01 14:07:52
如何让Delphi各个输入和显示物件正确国际音标或者其他语言字符?
对于英语国际音标问题,网上大部分都是说搞个 金山的字库,但是
就没有其他办法了吗?难道Unicode里面就没有这些字符?
怎么做可以直接使用windows本身自带的字符?

function LoadPureUnicode(f:string;b:boolean=true):WideString;
var//读取Unicode文件
ms:TMemoryStream;
hs:String;
begin
Result:='';
if not FileExists(f) then exit;
ms:=TMemoryStream.Create;
ms.LoadFromFile(f);
if b then begin
SetLength(hs,2);
ms.Read(hs[1],2);
if hs<>#$FF#$FE then begin ms.Free; exit; end;
SetLength(Result,(ms.Size-2) div 2);
ms.Read(Result[1],ms.Size-2);
end else begin
SetLength(Result,ms.Size div 2);
ms.Read(Result[1],ms.Size);
end;
ms.Free;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
MessageBoxW(0,PWideChar(LoadPureUnicode('1.txt')),PWideChar('d'),0);
end;
1.txt内容为Unicode字符比如æ.

这个必须用字库,要么你用图片,没别的办法!!!!!!

是的没有。windows本身不具备这种功能

从Unicode里有的找吧。

A a α ɑ ā ă ạ ả ã â ä å