hi all,

i'm a newbie..

i downloaded excel reader class from http://sourceforge.net/projects/phpexcelreader

a column in my excel file have value "La civilisation française en évolution I",
but when i echo, it displayed as "La civilisation fran�aise en �volution I"

below if my code:

$filename = "test.xls";
$reader=new Spreadsheet_Excel_Reader();
$reader->setUTFEncoder('iconv');
$reader->setOutputEncoding('UTF-8');
$reader->read($filename);

foreach($reader->sheets as $k=>$data)
{
foreach($data['cells'] as $row)
{
echo " <BR> ".$title = $row[3];
echo "\n";
}
}

p/s: is my encoding (UTF-8) right?

Thank you so much in advance wink

    Your excel data should be UTF-8 but your HTML output my not be. Try adding a header line (prior to any HTML output or the header won't be sent):

    header("Content-Type: text/html; charset=UTF-8");

    Or encode the special characters in HTML encoding:

    echo " <BR> ".$title = htmlentities($row[3],ENT_QUOTES,'UTF-8');
      Write a Reply...