Board index » delphi » ASCII Dos to ASCII Ansi

ASCII Dos to ASCII Ansi

Hello
How I can convert an .txt file from ASCII Dos
to ASCII ANSI, preferable during runtime.
Thanks Sorin
 

Re:ASCII Dos to ASCII Ansi


You can use:

uses
  Windows;

function DosToAnsi(S: String): String;
begin
  SetLength(Result, Length(S));
  OEMToCharBuff(PChar(S), PChar(Result), Length(S));
end;

function AnsiToDos(S: String): String;
begin
  SetLength(Result, Length(S));
  AnsiToOEMBuff(PChar(S), PChar(Result), Length(S));
end;

"Sorin Hershcu" <so...@netvision.net.il> schreef in bericht
news:8difoc$8ro$1@news.netvision.net.il...

Quote
> Hello
> How I can convert an .txt file from ASCII Dos
> to ASCII ANSI, preferable during runtime.
> Thanks Sorin

Other Threads