By using the script below i am able to convert MS words documents to txt so as to insert it into mysql databse.
<?php
$word = new COM("word.application") or die ("Could not initialise MS Word object.");
$word->Documents->Open(realpath("file.doc"));
// Extract content.
$content = (string) $word->ActiveDocument->Content;
echo $content;
$word->ActiveDocument->Close(false);
$word->Quit();
$word = null;
unset($word);
?>
However this script does not support utf8 characters. My database is set as utf 8.
This is a very rare question, i seriously hope someone who has encounter and solve this help me please.
a million points for answering
<?php
$word = new COM("word.application") or die ("Could not initialise MS Word object.");
$word->Documents->Open(realpath("file.doc"));
// Extract content.
$content = (string) $word->ActiveDocument->Content;
echo $content;
$word->ActiveDocument->Close(false);
$word->Quit();
$word = null;
unset($word);
?>
However this script does not support utf8 characters. My database is set as utf 8.
This is a very rare question, i seriously hope someone who has encounter and solve this help me please.
a million points for answering