From: ("")
Date:  19 Oct 2017 15:45:56 Hong Kong Time

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

NNTP-Posting-Host:  null

Edit report at

 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.


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 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

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

I already upgraded to the newest development version of OLE and

Test script:
I had to insert this line on top: 


Edit this bug report at