Re: detecting file type by magic number


Subject: Re: detecting file type by magic number
From: Thomas Fletcher (thomasf@qnx.com)
Date: Thu Jan 20 2000 - 12:43:58 CST


On Thu, 20 Jan 2000 sterwill@abisource.com wrote:

> Kevin Vajk wrote:
> > > Now detecting abiword takes 8 bytes.
> >
> > Excellent! :) If and when everyone agrees that it makes sense
> > to begin all abiword documents with the string "<abiword", then
> > I'd be glad to start harassing Linux vendors (and the UNIX vendor
> > I work for) about the magic file.
>
> I'm wondering if starting with "<abiword>" isn't as clean as doing
> something more established (like declaring our XML DTD through
> something like "<!doctype ...>"). I know too little about XML
> conventions to concoct the needed string, and we're going to need
> to tag our documents eventually.

What I hate about this is that we are relying on the
<abiword> being at the start of the file, which isn't
necessarily the case ... it could be after a wack of
blank spaces or after an XML comment section.

Thomas

-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf



This archive was generated by hypermail 2b25 : Thu Jan 20 2000 - 12:43:44 CST