in reply to Parsing a text file without newlines
Tom... Ran across similar problem myself with some WWW stuff... There's no standard definition on simple TEXT files between DOS, WIN, UNIX, etc... Windows uses a <CR><LF> (2-chars) as it's new line "\n". Other systems use just a <CR> which is "\c", while others yet use just a <LF> which is "\l". "Smart" editors accomodate these differences. Try making a small change and saving the file, some editors will convert to your native machine. Lastly, try doing a "HEX" or "OCTAL" dump of the source file and parse the lines base on what you see there.
|