[Jprogramming] Scanning a large file

Joey K Tuttle jkt at qued.com
Wed May 17 02:33:35 HKT 2006


OK, MS (not bashing women :) Excel - the problem is,
one often doesn't have the choice "not to use it" in
the sense that people send files exported from Excel...

A case where you can choose not to use it includes things
like trying to use Excel to open a text file that starts
with the ascii characters "ID " (or a tab in place of that
blank) -- actually the choice is made for you in that case,
since Excel rejects the file. But I imagine there are many
dark corners like that - and of course you are right, any
program may choose to elide a common sense line ending.
Still, that seems a bit irresponsible in most cases.

- joey

At 10:12  -0700 2006/05/16, Oleg Kobchenko wrote:
>These are interesting stories about line terminators.
>I agree on providing all the data.
>But I think absence of final terminator is more
>a stylistic issue (or a matter of choice) than a defect.
>
>Hence, it more like truthful conveying than alerting
>cleanliness.
>
>Here's on cygwin:
>
>xx at yy ~
>$ cat > t1.txt
>one
>two
>
>xx at yy ~
>$ cat > t2.txt
>one
>two
>xx at yy ~
>$ od -c t1.txt
>0000000   o   n   e  \r  \n   t   w   o  \r  \n
>0000012
>
>xx at yy ~
>$ od -c t2.txt
>0000000   o   n   e  \r  \n   t   w   o
>0000010
>
>
>P.S. Unless, it's just an excuse to bash Microsoft again:
>picking on Excel, that "$" in the name... If you don't
>like it -- don't use it. Any program can do that:
>you can either put EOL at the end or not,
>so the chance is 50-50. :-)
>
>
>
>--- Joey K Tuttle <jkt at qued.com> wrote:
>
>>  In any case, because of programs like Excel, any line reading
>>  program should do its best to provide all the data - and should
>  > likely alert the user that things didn't end cleanly...
>


More information about the Programming mailing list