Hello, they are most probably WP files embedded in an OLE2 storage.
I can confirm this. As David has written, the header of the File 1 original is
d0 cf 11 e0 a1 b1 1a e1, which is exactly the magic identifier of OLE
compound document (or structured storage, as often Microsoft refers).
There is a solution in libwps (http://libwps.sf.net ) that implements the
WPXInputStream using the C++ stl stream implementations and Ariya
Hidayat's POLE library for handling OLE2.
Yes, see this:
http://libwps.svn.sourceforge.net/viewvc/libwps/libwps/src/lib/WPSOLEStream.cpp
Thanks for your help. I've integrated WPSOLEStream.cpp, WPSStream.cpp, and WPSStreamImplementation.cpp and the corresponding header files into libwpd 0.8.9 and modified wpd2text to use WPSFileStream. I've temporarily changed "WPS" in the file names to "WPDOLE2" to remind me they're slightly different.
It's recognising the OLE container and the WP magic and header, but getting confused somewhere in the parser. It's also not recognising a "normal" WordPerfect file. If I get a chance over the weekend I'll sort those out.
One thing that slowed me down: I merged bits of wps2text and wpd2text main.cpp files, and forgot to change the argument to new WPSFileStream. The code segment was:
char *szInputFile;
The argv[1] would have gone unnoticed, but I tried it first with the --info argument. I was convinced I had some seriously deep bug, started debugging, and only got suspicious down in libwps::StorageIO::load(), where the bufsize = buf.tellg() statement returned 0xFFFFFFFF.
Should it have tripped out somewhere before then with a non-existent file error?
regards - David
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Libwpd-devel mailing list Libwpd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libwpd-devel