X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Thu, 02 May 2002 07:12:26 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <7704-Thu02May2002071225+0300-eliz@is.elta.co.il> X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: (jansb000@planet.nl) Subject: Re: how to determine if a file is text/binary References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "jansb000" > Newsgroups: comp.os.msdos.djgpp > Date: Wed, 1 May 2002 21:45:36 +0200 > > If all data that you read is between Hex 20 and Hex 7F (with exception for > Hex 0D or Hex 0D 0A) then there is a good chance the file is ASCII. This method will say that, e.g., Info files are binary, which I'm not sure is what you want. Files with non-ASCII characters (those with the 8th bit set) will also appear as binary, which is only good if you are in the US. In my experience, the test for null characters has proven itself as the most reliable one, believe me.