|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48025 PHP Includes UTF-8 BOM
Submitted: 2009-04-20 11:36 UTC Modified: 2009-04-22 00:57 UTC
From: myh at live dot com Assigned:
Status: Not a bug Package: *Unicode Issues
PHP Version: 6CVS-2009-04-20 (CVS) OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: myh at live dot com
New email:
PHP Version: OS:


 [2009-04-20 11:36 UTC] myh at live dot com
I find PHP includes (require function) the UTF-8 BOM (byte order mark) in my webpages.

That is:
I have three pages, Normal.php, IncParms.php and Parameters.php.
Parameters.php is encoded in UTF-8 with BOM.
(You can download the here:

Normal.php shows the normal layout.
But IncParms.php not only includes the PHP code of Parameters.php but also includes the BOM of it.
And the layout shown by IncParms.php is incorrect and different from Normal.php.

You can see the included BOM of the page generated by IncParms.php by a hexadecimal editor.

I recorded a video to exhibit how to reproduce the bug:

Reproduce code:

Expected result:
PHP shouldn't include the UTF-8 BOM.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-21 17:01 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

 [2009-04-22 00:57 UTC] myh at live dot com
I think my PHP have enabled zend-mulitbyte
because it was configured by --enable-snapshot-build, isn't it?
This is my phpinfo():

If my PHP certainly enable zend-multibyte, then the layout error problem remains.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 13 22:01:29 2024 UTC