www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/02/00:41:28

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" <eliz AT is DOT elta DOT co DOT il>
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: <aapgkv$im1$1@reader05.wxs.nl> (jansb000@planet.nl)
Subject: Re: how to determine if a file is text/binary
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020430081409 DOT 3296J-100000 AT is> <c21a43ff DOT 0204302309 DOT 7c13ed96 AT posting DOT google DOT com> <aapgkv$im1$1 AT reader05 DOT wxs DOT nl>
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

> From: "jansb000" <jansb000 AT planet DOT nl>
> 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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019