Re: cvs: pear /Spreadsheet_Excel_Writer/Writer Worksheet.php
| From: | Helgi Þormar | Date: | Tue, 08 Nov 2005 12:35:30 +0000 |
| Subject: | Re: cvs: pear /Spreadsheet_Excel_Writer/Writer Worksheet.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-36154@lists.php.net to get a copy of this message | ||
Hi Xavier,
It would be very helpful if you could follow the PEAR CS for this piece of
code (http://pear.php.net/manual/en/standards.control.php)
- Helgi
On Tue, 08 Nov 2005 02:58:46 +0000, Xavier Noguer Gallego wrote:
> xnoguer Mon Nov 7 21:58:46 2005 EDT
>
> Modified files:
> /pear/Spreadsheet_Excel_Writer/Writer Worksheet.php
> Log:
> adding method setInputEncoding() to support different charsets (bug
> #1572). Thanks to pear-bug-1572 at ryandesign dot com
> function writeStringBIFF8($row, $col, $str, $format = 0) {
> - $strlen = strlen($str);
> + if ($this->_input_encoding == 'UTF-16LE') + {
> + $strlen = function_exists('mb_strlen') ? mb_strlen($str,
> 'UTF-16LE') : (strlen($str) / 2); + $encoding = 0x1;
> + }
> + elseif ($this->_input_encoding != '') + {
> + $str = iconv($this->_input_encoding, 'UTF-16LE', $str); +
> $strlen = function_exists('mb_strlen') ? mb_strlen($str,
> 'UTF-16LE') : (strlen($str) / 2); + $encoding = 0x1;
> + }
> + else
> + {
> + $strlen = strlen($str); + $encoding = 0x0;
> + }
> $record = 0x00FD; // Record identifier
> $length = 0x000A; // Bytes to follow $xf
> = $this->_XF($format); // The cell format
> - $encoding = 0x0;
>
> $str_error = 0;