David J Taylor wrote: > Delphi wrote: > [] > >>The problem is that Readln() reads the whole file as one line. When I >>load this file into Textpad it show 13 lines. What am I missing? > > > Perhaps the file does not have the normal <CR><LF> sequences. Does it > display correctly in Notepad? > > Try using a TStringList.LoadFromFile method instead, and parsing the lines > after they are read in.
Given that the code is looking for '<BR>' sequences in the file, I'm guessing that it contains HTML code. The HTML standard has no requirement for a particular line break sequence in the text of the HTML; whether Carriage Return, Line Feed, or a combination; or any line breaks at all for that matter. HTML files received from non-DOS/Windows servers often will not conform to the Carriage Return+Line Feed sequence common on that platform. Full HTML parsers expect this and don't concern themselves with line terminators. So I suspect your assessment is probably spot on. Stephen Posey [EMAIL PROTECTED] _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

