Most of the document's parsed are clean, however,
their are a number that contain characters as displayed below. Any ideas on how
to clean this up further?
| | | | | â€ž | d
8 8 8 8 L â€ Ð° Ð° Ð° Ð° ÐŒ
k ÐŒ Ð° Ð° Ð° Ð° Ð° 8
Ñž Ñž Ñž Ñž Ñž Ñž Ñž Ñž Ñž
Ñž Ñž Ñž Ñž Ñ‚ Ñž Ñž Ñ‚ Ñ‚ Ñ‚ Ñž Ñž Ñž Ñ‚ Ñž Ñ‚ Ñ‚ Ñž â€“ Ñ• Ñ‚ Ñ‚
--- NOTE for developers
In doc2html.pl (all versions?);
around line 253; in the if($XLS2HTML) statement; the $cmdl = "$cmd -fw $input"
line uses options "-fw". It appears those are no longer
valid in xls2csv (Catdoc Version 0.93.3).
Thanks very much for your
The magic number for Word documents (Word6 &
later) is \320\317\021\340, the same as Excel spreadsheets. That is
why doc2html.pl has to check both magic number and MIME-type.
I don't recognise '^\376\067\0\043',
could it be the magic number for some form of Word for MacIntosh
Doc2html.pl should read the start of each file as
binary to get the magic number, but on some systems it reads it as text. Add a
line to sub read_magic so that it becomes:
open(FILE, "< $Input") || die "Can't open
Let us know how you get on.
Information Systems Services
----- Original Message -----
Sent: Wednesday, July 21, 2004 10:38
Subject: [htdig] Issues when parsing
upgrading to the new 3.2.0b6 version of htdig. Running into issues on when
parsing msword docs (doc, xls).
doc2html.pl via command line directly on a word doc I see the $MAGIC
number's aren't being determined correctly for the doc
file. Instead of pulling: $magic = '^\376\067\0\043'; (word6,7/97)
it pulls: ÐÏà¡±á>þÿ
xls, when running doc2html.pl via command line the $MAGIC numbers aren't:
$magic = '^\320\317\021\340'; as expected but:
It looks like doc2html.pl is receiving these as
binary files instead text. Doing the command "file -i" on the documents
confirms the mime type to be application/msword for
Doing a octal dump on the first line of the file does
reveal the correct $magic numbers:
$od -b /opt/htdig/contrib/doc2html/todays-news.doc |
0000000 320 317 021 340 241 261 032 341 000 000 000 000 000 000 000
Running the doc file directly through catdoc returns
pristine text output as does running the xls file directly through xls2csv.
Server is RH Linux Enterprise with perl
Any ideas on how to counter and/or correct this
Thanks for any