🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16597

Re: Ascii or binary file

#16597
From: Andrue Cope
Date: Thu, 08 May 2003 15:26
21 lines
1950 bytes
Jim Dodd,

> In this way, we don't use Andrue's "times 3" fudge factor. We just say 
> that if ANY character falls out side the range [8,9,10,13,26,32-127], 
> the file is probably a binary file.
>

'Fudge factor'? How dare you sir. It's a kludge :)

In truth our routine is son-of-son-of-something-written-many-years-ago 
and hence my disclaimer about statistics. It's a definite example of code 
that has evolved to meet requirements. We don't claim to know why it's so 
good we just accept that it is <g,d&r>.

Another reason why I've never tried to rationalise it is that it counts 
lines and generates an index for fast seeking. It handles various methods 
of EOL marking (CR/LF, LF/CR, CR, LF) and I don't want to touch that code 
with a bargepole :)

Andrue Cope
[Bicester, UK]
Technical Details
Message-ID: <VA.00001c9e.01a5e272@email.address.sorry>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3eba4f4a@newsgroups.borland.com> <VA.00001c9d.01332329@email.address.sorry> <3eba6b37$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,65ce5fe967ca5eb
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-08 08:32:52 PST
Date: Thu, 08 May 2003 16:26:15 +0100
Newsgroups: borland.public.cppbuilder.nativeapi
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va
Message-ID: <VA.00001c9e.01a5e272@email.address.sorry>
Subject: Re: Ascii or binary file
From: Andrue Cope <not.a.valid@email.address.sorry>
Reply-To: not.a.valid@email.address.sorry
References: <3eba4f4a@newsgroups.borland.com> <VA.00001c9d.01332329@email.address.sorry> <3eba6b37$1@newsgroups.borland.com>
NNTP-Posting-Host: 217.207.223.34
X-Trace: newsgroups.borland.com 1052407576 217.207.223.34 (8 May 2003 08:26:16 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail