转换成delphi就是
附图:1C#中执行的结果,2delphi的执行结果
function GB2UniCode(GB:string):string;
var
s: string;
i, j, k: integer;
a: array [1..160] of char;
begin
s:='';
StringToWideChar(GB, @(a[1]), 500);
i:=1;
while ((a[i]<>#0) or (a[i+1]<>#0)) do
begin
j:=Integer(a[i+1]);
k:=Integer(a[i]);
s:=s+Copy(Format('%X ',[k*$100+j+$10000]) ,2,4);
//S := S + Char(k)+Char(j);
i:=i+2;
end;
Result:=s;
end;