Bug #21249 [Com]: Document starts with utf-8 BOM bytes

From: Date: Thu, 19 Oct 2017 07:45:56 +0000
Subject: Bug #21249 [Com]: Document starts with utf-8 BOM bytes
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-11405@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=21249&edit=1 ID: 21249 Comment by: anton dot rops at autogrant dot nl Reported By: anton dot rops at autogrant dot nl Summary: Document starts with utf-8 BOM bytes Status: Bogus Type: Bug Package: Spreadsheet_Excel_Writer Operating System: CentOs 7 Package Version: 0.9.4 PHP Version: Irrelevant Roadmap Versions: New Comment: You are right, it was in one of my files. Thanks. Previous Comments: ------------------------------------------------------------------------ [2017-10-18 22:30:54] sanmai -Status: Open +Status: Bogus Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. Usually some of your own files are the culprit. You can remove BOM from them with sed: sed -i '1s/^\xEF\xBB\xBF//' example.php If you happen to find a file with BOM in this project, please reopen this issue. Finding such files is as simple as: grep -rl $'\xEF\xBB\xBF' . ------------------------------------------------------------------------ [2017-10-18 09:42:01] antonrops Description: ------------ The downloaded document starts with utf-8 BOM bytes: 0xEF 0xBB, 0xBF. An error is generated when opening it in Excel: File format and extension of 'test.xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway? The same script on an old server works fine, it generates a file 3 bytes shorter. I already upgraded to the newest development version of OLE and Spreadsheet_Excel_Writer. Test script: --------------- https://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.intro.php. I had to insert this line on top: date_default_timezone_set("Europe/Amsterdam"); ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=21249&edit=1

« previous php.pear.bugs (#11405) next »