Subject: Re: How to fix CRLF stuff...
From: Bob Rogers (rogers-netatalk@rgrjr.dyndns.org)
Date: Wed Feb 14 2001 - 10:43:38 EST
   From: Jeremy Buchmann <jeremy@wellsgaming.com>
   Date: Tue, 13 Feb 2001 09:22:21 -0800
   Okay, this seems to be getting very complicated...is there a more simple
   approach?
   For example, I use the Unix command "less" quite a bit to read through text
   files.  But when I type "less picture.jpg", less tells me that it's a binary
   file.  How does it know?  I don't know exactly how it works, but I'm
   guessing it just scans the first few hundred or thousand bytes and checks
   for non-text/non-line-ending characters and if any are there, it reports it
   as a binary file.
I don't know about less, but I understand some apps just look for NUL
characters, a dead giveaway for a binary file (at least in the Unix
world).
   This may sound overly-simplistic, but it seems to work incredibly
   well.  What do you think? . . .
Nothing is too simple if it works.  ;-}  But isn't this likely to get
confused by Mac characters and/or internal markup?  If you create some
nontrivial test files (e.g. with font changes, bullet characters) in
SimpleText and save them to a netatalk share, what does `less' do with
them?
                                        -- Bob
This archive was generated by hypermail 2b28 : Sun Oct 14 2001 - 03:04:32 EDT