From: myh at live dot com Operating system: Windows XP PHP version: 6CVS-2009-04-20 (CVS) PHP Bug Type: *Unicode Issues Bug description: PHP Includes UTF-8 BOM
Description: ------------ 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: http://cid-87cef5e6683b5427.skydrive.live.com/self.aspx/Share/PhpBomBug.zip ) 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: http://cid-87cef5e6683b5427.skydrive.live.com/self.aspx/Share/PhpBomBug.avi Reproduce code: --------------- http://cid-87cef5e6683b5427.skydrive.live.com/self.aspx/Share/PhpBomBug.zip Expected result: ---------------- PHP shouldn't include the UTF-8 BOM. -- Edit bug report at http://bugs.php.net/?id=48025&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48025&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48025&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48025&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48025&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48025&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48025&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48025&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48025&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48025&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48025&r=support Expected behavior: http://bugs.php.net/fix.php?id=48025&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48025&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48025&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48025&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48025&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48025&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48025&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48025&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48025&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48025&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48025&r=mysqlcfg