title: PHP with UTF8 output into PHPExcel?
body: <p>I'm having an issue with exporting data from a utf8 mysql database into an excel sheet with PHPExcel and retaining chinese characters.  My mysql db is utf8 and has numerous chinese characters in it, and I'm exporting that data into a multi-sheet xls file (excel5) and every export the chinese characters turn into "?".  I've tried utf8_encode() but it doesn't work for me.  I also tried changing the output to excel2007 thinking it would be an excel5 writer issue.</p>
  
  <p>Is there a way to get Chinese characters to export correctly?
  Do I have to make the entire php file utf8? and if so how would I go about doing so?</p>
  
  <p>Here is the portion I'm having issue with:</p>
  
  <pre><code>$res2 = mysql_query("SHOW COLUMNS FROM ".$sheetnametemp);
  while($row2 = mysql_fetch_array($res2, MYSQL_NUM)) {
    $counter = 2;
    $cell = $coltemp;
    $cell .= $counter;
    $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell, $row2[0]);
        $result = mysql_query("SELECT * FROM ".$sheetnametemp);
        while($row = mysql_fetch_array($result))
        {
          $counter++;
          $cell2 = $coltemp;
          $cell2 .= $counter;
          utf8_encode($row[$row2[0]]);
          echo "&lt;br /&gt;";
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell2,utf8_encode($row[$row2[0]]));
        }
  </code></pre>
  
  <p>I need to use those chinese characters as it is a multi-lingual catalog db so changing it to english wouldn't help.  Also I am currently on a Mac with Xampp if that info is helpful in anyway.</p>