Re: line terminator

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 11 Oct 2004, at 9:41, George Walters wrote:

> 
> 
> What is the normal line terminator for ascii files (dos/win) CR, LF or both?
> 
> I had a bug and found that the last line in the file had no CR, LF but 
> all the other lines had a CR. I'm wondering if I ported the files 
> incorrectly from brand x operating system. (Theos OS).

I have found it is best to always check every file you read (unless you wrote 
it in an Eu program) for which combination of line terminators. A text editor 
may save it one way, a browser another way, any webpage may be 
backwards, the OSs are different, the option of the ftp downloader may 
change the file, etc etc. I never parse on \n anymore, i always parse on 
{10,13} now. Also, when you use Eu to open a file for reads or writes, save 
yourself some grief and use the "b"(inary) option.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu