Re: Determining when a file is an Open Office Document

2007-01-19 Thread Ross Ridge
Ross Ridge wrote: > So identifying PDF files is pretty easy. Steven D'Aprano wrote: > Sure. MIS-identifying PDF files is pretty easy. Identifying them is not. > Consider this example: Your contrived example doesn't show how a PDF file would be misidentified, it only shows how a file deliberately

Re: Determining when a file is an Open Office Document

2007-01-19 Thread Steven D'Aprano
On Fri, 19 Jan 2007 12:48:14 -0800, Ross Ridge wrote: > tubby wrote: >> Now, If only I could something like that on PDF files :) > > PDF files should begin with "%PDF-" followed by a version number, eg. > "%PDF-1.4". The PDF Reference notes that Adobe Acrobat Reader is a bit > more flexiable abo

Re: Determining when a file is an Open Office Document

2007-01-19 Thread Robert Marshall
On Fri, 19 Jan 2007, Steven D'Aprano wrote: > On Fri, 19 Jan 2007 12:22:04 +1100, Ben Finney wrote: > >> tubby <[EMAIL PROTECTED]> writes: >> >>> Silly question, but here goes... what's a good way to determine >>> when a file is an Open Office document? I could look at the file >>> extension, bu

Re: Determining when a file is an Open Office Document

2007-01-19 Thread Ross Ridge
tubby wrote: > Now, If only I could something like that on PDF files :) PDF files should begin with "%PDF-" followed by a version number, eg. "%PDF-1.4". The PDF Reference notes that Adobe Acrobat Reader is a bit more flexiable about what it will accept: 13. Acrobat viewers require only that

Re: Determining when a file is an Open Office Document

2007-01-19 Thread Steven D'Aprano
On Fri, 19 Jan 2007 12:22:04 +1100, Ben Finney wrote: > tubby <[EMAIL PROTECTED]> writes: > >> Silly question, but here goes... what's a good way to determine when >> a file is an Open Office document? I could look at the file >> extension, but it seems there would be a better way. > > Yes, the

Re: Determining when a file is an Open Office Document

2007-01-18 Thread tubby
Ross Ridge wrote: > tubby wrote: >> Silly question, but here goes... what's a good way to determine when a >> file is an Open Office document? I could look at the file extension, but >> it seems there would be a better way. VI shows this info in the files: >> >> mimetypeapplication/vnd.oasis.opendo

Re: Determining when a file is an Open Office Document

2007-01-18 Thread Ross Ridge
tubby wrote: > Silly question, but here goes... what's a good way to determine when a > file is an Open Office document? I could look at the file extension, but > it seems there would be a better way. VI shows this info in the files: > > mimetypeapplication/vnd.oasis.opendocument.textPK It's a ZIP

Re: Determining when a file is an Open Office Document

2007-01-18 Thread Ross Ridge
tubby wrote: > Silly question, but here goes... what's a good way to determine when a > file is an Open Office document? I could look at the file extension, but > it seems there would be a better way. VI shows this info in the files: > > mimetypeapplication/vnd.oasis.opendocument.textPK It's a ZIP

Re: Determining when a file is an Open Office Document

2007-01-18 Thread Ben Finney
tubby <[EMAIL PROTECTED]> writes: > Silly question, but here goes... what's a good way to determine when > a file is an Open Office document? I could look at the file > extension, but it seems there would be a better way. Yes, the name of a file may be useful for communicating with humans about t

Determining when a file is an Open Office Document

2007-01-18 Thread tubby
Silly question, but here goes... what's a good way to determine when a file is an Open Office document? I could look at the file extension, but it seems there would be a better way. VI shows this info in the files: mimetypeapplication/vnd.oasis.opendocument.textPK mimetypeapplication/vnd.oasis.o