Funciona !!
Gracias, he probado a usar la función y funciona corectamente.
Por si alguien lo necesita aqui teneis una funcion para facilitar las cosas:
function ANSI2ASCII(AText:string):string;
const MaxLength = 255;
var PText : PChar;
begin
PText:=StrAlloc(MaxLength);
StrPCopy(PText,AText);
{$IFDEF WIN32}
CharToOEM(PText,PText); {32Bit}
{$ELSE}
AnsiToOEM(PText,PText); {16Bit}
{$ENDIF}
Result:=StrPas(PText);
StrDispose(PText);
end;
.....
var campo:string;
....
campo:= ANSI2ASCII(campo);
writeln(F,campo);
....
Saludos!!!!
|