|
<< Click to Display Table of Contents >> Delphi Examples: DbiAnsiToNative |
![]() ![]()
|
Translate a string from the ANSI character set to the language driver's native character set. This example uses the following input:
fDbiAnsiToNative(CustTbl, StringToConvert);
The function is defined as:
function fDbiAnsiToNative(Table: TTable; AnsiStr: String): String;
var
pDesc: pLDDesc;
Len: Word;
Done: Boolean;
begin
Len := Length(AnsiStr);
SetLength(Result, Len);
Check(DbiGetLDObj(Table.Handle, pointer(pDesc)));
Check(DbiAnsiToNative(pointer(pDesc), PChar(Result), PChar(AnsiStr), Len, Done));
end;