Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.3

Bug #7534 XLS Character encoding support
Submitted: 2006-05-01 17:56 UTC
From: torgny dot bjers at gmail dot com Assigned: wiesemann
Status: Closed Package: Structures_DataGrid (version 0.6.3)
PHP Version: 5.1.2 OS: Linux FC4
Roadmaps: (Not assigned)    
Subscription  


 [2006-05-01 17:56 UTC] torgny dot bjers at gmail dot com (Torgny Bjers)
Description: ------------ When exporting an Ecxel document that contains multi-byte characters, the Excel driver needs to be set to version 8 and to have the encoding set according to what the input is. I've included a fix for this by setting the version when the input encoding has been specified, since it will not work with anything below version 8. Test script: --------------- /** * Encoding for use with the worksheet input strings. * @var string */ var $_encoding; -------------------- /** * Sets the input encoding used when adding rows to the worksheet. * * @access public * @params string $encoding The selected encoding for use with iconv */ -------------------- function setEncoding($encoding) { $this->_encoding = $encoding; } /** * Get the spreadsheet object * * @access public */ function &getSpreadsheet() { $dg =& $this->_dg; if ($this->_sendToBrowser) { $this->_workbook = new Spreadsheet_Excel_Writer(); $this->_workbook->send($this->_filename); } else { $this->_workbook = new Spreadsheet_Excel_Writer($this->_filename); } $this->_worksheet =& $this->_workbook->addWorksheet(); if (!empty($this->_encoding)) { $this->_workbook->setVersion(8); $this->_worksheet->setInputEncoding($this->_encoding); } --------------------

Comments

 [2006-05-08 10:24 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!