tags:

views:

69

answers:

2

Dear everyone,

I want to retrieve bangla data that written in MS word file Using UNICODE.How can I retrieve this data using PHP.I can retrieve english data from doc file using antiword.But i can not retrieve bangla.Pls help me as soon as possible.

It is very much urgent for me.

A: 

I have used PHP and COM (only on Windows Servers) to read document files.

Extracting text from Word Documents via PHP and COM

$word = new COM("word.application") or die ("Could not initialise MS Word object.");

$word->Documents->Open(realpath("Sample.doc"));

// Extract content.

$content = (string) $word->ActiveDocument->Content;

echo $content;

$word->ActiveDocument->Close(false);

$word->Quit();

$word = null;

unset($word); ?>

I think you will have to use Windows Servers to get this done correctly. Or can you convert the document into OpenOffice format and give it a go? More details on PHP COM are available here. http://us3.php.net/manual/en/book.com.php

Webber
A: 

You may solve this by using fopen() function.

Tareq
MS Word is a proprietary format, simply opening it and reading the contents won't work.
Pekka