Hi,
I have a DBF file which has data in some DOS codepage. I'm trying to get the contents displayed correctly in Linux.
I am aware of the 'OnTranslate' event of the TDBF component. (obviously, all TStringFields have Transliterate set to True)
I am also aware that there is some OEMToAnsi windows function which - in a delphi application - does the trick: the data is then displayed correctly if I do:
function TMainForm.DBFFileTranslate(Dbf: TDbf; Src, Dest: PChar; ToOem: Boolean
): Integer;
begin
OemToAnsi(Src,dest);
Result:=-1;
end;Obviously, this works in Delphi because Windows uses the ANSI codepage.
In lazarus (linux) this does not work. There is a space on the place of special characters (german umlauts, ringel-s and so on)
I also know Lazarus uses utf8.
So, How do I get my dos/ansi/whatever string displayed correctly in the grid?
Michael.
