Re: Re: iconv is messing up a spreadsheet generated by the Spreadsheet Excel Writer

From: Date: Thu, 15 Jan 2009 14:06:54 +0000
Subject: Re: Re: iconv is messing up a spreadsheet generated by the Spreadsheet Excel Writer
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-286428@lists.php.net to get a copy of this message
On Wed, 14 Jan 2009 13:19:31 +0200, Thodoris wrote:
Variable_name Value character_set_client utf8 character_set_connection utf8 character_set_database latin1 character_set_filesystem binary character_set_results utf8 character_set_server latin1 character_set_system utf8
    
What's the character set of the column you get the data from?
The charset: latin1 and the collation: latin1_swedish_ci.
I'm not sure exactly how these affect the data returned to PHP. The 'connection' and 'results' variables would suggest utf8. In any case, it must be one of 'latin1' or 'utf8'. What happens if you do: $worksheet->setInputEncoding('latin1'); /* or 'ISO-8859-1' */ It would still be helpful to see a hexdump. /Nisse
Since the data are in greek I can't see anything but despite that the xls still breaks. In addition to that MS-Excel doesn't even open the file because it thinks it is corrupted. OOffice still opens it as before but it breaks in a certain line. BTW As you have already guessed I am using: $worksheet->setInputEncoding('UTF-8'); I think that it is the pear extension's problem and has something to do with the encoding. I hex dumped the data and no curious characters seem to be there. Moreover the line in the xls that the script breaks the data written changes if I change the encoding. -- Thodoris

« previous php.general (#286428) next »