function MAKELANGID(usPrimaryLanguage, usSubLanguage: WORD): WORD;
begin
Result := (usSubLanguage shl 10) or usPrimaryLanguage;
end;
function MAKELCID(wLanguageID: WORD;
wSortID: WORD = SORT_DEFAULT): LCID;
begin
Result := MakeLong(wLanguageID, wSortID);
end;
function GBTOBIG5(Value: string): String;
var
l: Integer;
s1: PChar;
begin
l := Length(Value);
getmem(s2,l+1);
LCMapString(MAKELCID(MAKELANGID(LANG_CHINESE,SUBLANG_CHINESE_SIMPLIFIED),SORT_CHINESE_PRC),
LCMAP_TRADITIONAL_CHINESE, pchar(value), l+1, s2, l+1);
Result :=strpas(s2);
freemem(s2,l+1)
end;
function BIG5TOGB(Value: string): String;
var
l: Integer;
s1: PChar;
begin
l := Length(Value);
getmem(s1,l+1);
LCMapString(MAKELCID(MAKELANGID(LANG_CHINESE,SUBLANG_CHINESE_SIMPLIFIED),SORT_CHINESE_PRC ),
LCMAP_SIMPLIFIED_CHINESE, pchar(value), l+1, s1, l+1);
Result :=strpas(s1);
freemem(s1,l+1)
end;