X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Tue, 30 Apr 2002 08:15:05 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: how to determine if a file is text/binary In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On 29 Apr 2002, xeon wrote: > I'm wondering, how to determine is a file is a text file, or a binary > file, programatically. The usual technique is to read a portion of a file, say, 16KB, and see if it contains null characters (`\0').