Board index » delphi » How to read a file in a Unix File Format

How to read a file in a Unix File Format

Hi all,

how I can read a file created in a UNIX Text format ? Actually I am using
the "readln" command to read these file but I am having some problems. The
content of the record is not correct. Maybe because the diference between
UNIX and DOS when treat then end of record. Somebody can help me ? There is
some way/command like "readln" ?

I am using DELPHI 3.

Thanks in advance,

Roberto Alexandre

 

Re:How to read a file in a Unix File Format


"Roberto Freitas Alexandre" <robe...@primorum.com.br> wrote in message
news:3c7076d0_1@dnews...

Quote

> how I can read a file created in a UNIX Text format ? Actually I am using
> the "readln" command to read these file but I am having some problems. The
> content of the record is not correct. Maybe because the diference between
> UNIX and DOS when treat then end of record. Somebody can help me ? There
is
> some way/command like "readln" ?

Instead of ReadLn, try creating a TStringList and calling its LoadFromFile
method.

--
Wayne Niddery (Logic Fundamentals, Inc.)
RADBooks: http://www.logicfundamentals.com/RADBooks/delphibooks.html
In a tornado, even turkeys can fly. - unknown

Other Threads