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

Bug #9533 mbstring.func_overload breaks Spreadsheet_Excel_Writer
Submitted: 2006-12-04 09:59 UTC
From: warrenklint at gmail dot com Assigned:
Status: Wont fix Package: Spreadsheet_Excel_Writer (version 0.9.1)
PHP Version: 5.1.2 OS: Ubuntu Dapper LTS
Roadmaps: (Not assigned)    
Subscription  


 [2006-12-04 09:59 UTC] warrenklint at gmail dot com (Warren Klint)
Description: ------------ Using php.ini's mbstring.func_overload = 7 breaks Spreadsheet_Excel_Writer

Comments

 [2006-12-04 10:17 UTC] warrenklint at gmail dot com
The following script, along with mbstring.func_overload = 7 in php.ini, will produce an invalid XLS file: <?php // Include PEAR::Spreadsheet_Excel_Writer require_once "Spreadsheet/Excel/Writer.php"; // Create an instance $xls =& new Spreadsheet_Excel_Writer(); // Send HTTP headers to tell the browser what's coming $xls->send("test.xls"); // Add a worksheet to the file, returning an object to add data to $sheet =& $xls->addWorksheet('Binary Count'); // Write some numbers for ( $i=0;$i<11;$i++ ) { // Use PHP's decbin() function to convert integer to binary $sheet->write($i,0,decbin($i)); } // Finish the spreadsheet, dumping it to the browser $xls->close(); ?>
 [2006-12-04 12:41 UTC] warrenklint at gmail dot com
A _workaround_ for this is: // save current encoding somewhere safe $original_encoding = mb_internal_encoding(); // hack mb_internal_encoding('ISO-8859-1'); // do spreadsheet stuff here // set the encoding back again mb_internal_encoding($original_encoding); But this defeats the point, because it prevents non-iso1 data being saved.
 [2006-12-12 15:29 UTC] warrenklint at gmail dot com
Hi! Any news on this? Thanks :)
 [2006-12-19 15:57 UTC] warrenklint at gmail dot com
I saw that this is fixed for the Perl equivalent, works with perl 5.8+
 [2009-11-30 16:38 UTC] cschmitz (Carsten Schmitz)
-Status: Open +Status: Wont fix
mbstring.func_overload is not supported - Please create a feature request instead.