PHP Classes

Unicode charset UTF-8

Recommend this page to a friend!

      MS-Excel Stream Handler  >  All threads  >  Unicode charset UTF-8  >  (Un) Subscribe thread alerts  
Subject:Unicode charset UTF-8
Summary:How to use UTF-8 charset
Messages:6
Author:Luca
Date:2008-04-10 09:56:50
Update:2009-12-26 15:53:54
 

  1. Unicode charset UTF-8   Reply   Report abuse  
Picture of Luca Luca - 2008-04-10 09:56:50
First of all: congratulations for this amazing class.

I have a problem concerning the charset used by client-side software (e.g. MS Excel or OpenOffice.org).
I encode my data in UTF-8 format, but when I download and open the generated xls, the charset seems to be ISO-8859-1 (Western Europe / Latin 1).

What I have to do?
Do I have to set some php header? - please note that I use: header ("Content-type: application/x-msexcel;charset=utf-8");
Is it an issue reguarding MS Excel (or OpenOffice)?


Thanks in advance.

  2. Re: Unicode charset UTF-8   Reply   Report abuse  
Picture of Jorrit Steetskamp Jorrit Steetskamp - 2008-05-26 17:26:13 - In reply to message 1 from Luca
I have the same problem. Someone found a solution yet?

  3. Re: Unicode charset UTF-8   Reply   Report abuse  
Picture of Jorrit Steetskamp Jorrit Steetskamp - 2008-05-26 17:49:15 - In reply to message 2 from Jorrit Steetskamp
I found it myself: Change line 106 of file excelwriter.inc.php to the appropiate charset.

  4. Re: Unicode charset UTF-8   Reply   Report abuse  
Picture of itzco itzco - 2008-08-25 12:28:21 - In reply to message 3 from Jorrit Steetskamp
That file doesn't exist! Did anyone find the solution? i tried the pear package but it also fails with UTF8....

  5. Re: Unicode charset UTF-8   Reply   Report abuse  
Picture of Pablo León Pablo León - 2008-12-10 12:33:50 - In reply to message 4 from itzco
Did you try to decode the array?

for($i = 0; $i < count($array); $i++) {
for($j = 0; $j < count($array[$i]); $j++) {
$array[$i][$j] = utf8_decode($array[$i][$j]);
}
}

  6. Re: Unicode charset UTF-8   Reply   Report abuse  
Picture of behnoosh moshtagh behnoosh moshtagh - 2009-12-26 15:53:54 - In reply to message 1 from Luca
I have this problem too
do you find the solution?