procedure p;
var
f:TextFile;
oemst:OemString;///declared as OemString = Type AnsiString(CP_OEMCP);
begin
AssignFile(f,fileName);
reset(f);
read(f,oemSt);
ShowMessage(oemst);
end;
In order to see within the show message the oemst in the proper encoding, one needs to declare:
setcodepage(oemst,862,false);
How is it possible to read from an oem file, and make sure the compiler show it correctly in oem encoding?
update: Working with Oem is a MUst, as I don't specify this old interface. working with readln assign file is part of the old code, and I rather have a solution using the old methods as it requires less work and testing.