Apache OpenOffice (AOO) Bugzilla – Issue 111457
The magic numbers / File Signature set in the word doucment during save is incorrect
Last modified: 2017-05-20 11:22:39 UTC
All Microsoft Office documents have the magic numbers / File Signatures as follows 1st byte - D0 2nd byte - CF 3rd byte - 11 4th byte - E0 In addition to this, Microsoft WORD documents have the additions magic numbers / File signatures as follows 512th byte - EC(236 in decimal) 513th byte - A5(165 in decimal) However the word documents creating using OO by saving as Microsoft word 95 or Microsoft word 97/2000/xp has the magic numbers as follows 512th byte - ffff fffd (-3 in dec) 513th byte - ffff ffff (-1 in dec) The magic numbers / file signatures are used to identify the type of the file. Since OO is setting a different magic number, we are unable to identify it as word document.Hence, the documents created using OO should also have the same magic numbers/ file signatures as used by Microsoft Office.
Created attachment 69361 [details] Sample microsoft word document created using MS office 2003
Created attachment 69362 [details] Microsoft word 95 doc created using open office
Created attachment 69363 [details] Microsoft word 97/2000/XP doc created using open office
At first I would say, that these "magic numbers" are used to identify whether a doc has been saved by MS Word or any other application (like OOo or an OCR software), so it is produced correctly by OOo. In this case your software has to be adapted to recognize OOo's doc format also as "valid". MRU->HBRINKM: could you please have a look and compare this with the .doc specification? Thanks!
If this is the case, then there should be some way to differentiate between the doc and xls files created by open office. The magic numbers present in the doc and xls files are also same (both in the first byte and 512th byte). The file signatures should be able to identify the file format, without relying on the file extension. Is there any way to differentiate the doc and xls files created by OOo?
Reset assigne to the default "issues@openoffice.apache.org".