#46692 [NEW]: include function outputs unwanted 3 byte chars (п»ї)

From: Date: Wed, 26 Nov 2008 20:53:19 +0000
Subject: #46692 [NEW]: include function outputs unwanted 3 byte chars (п»ї)
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1548@lists.php.net to get a copy of this message
From: aleks dot sys at gmail dot com Operating system: Windows XP PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: include function outputs unwanted 3 byte chars (&#1087;»&#1111;) Description: ------------ When you use include, require etc functions for including any file even if it contain only <?php?> or <??> or even if it empty it will output some doesn't seen to the eye (in the browser) special chars "&#1087;»&#1111;" 3 bytes (EF BB BF). It happend when the included file is in UTF-8 encode. I've found possibly only one solution at least in this stage, is to save the file as "UTF8 without BOM" or ANSI. But don't UTF-8! After I spent a lot of time to realize it and only when I find the solution to this problem i found another report for this bug: http://bugs.php.net/bug.php?id=22108 from 2003 So it should be or fixed or at least be in the documentation! Reproduce code: --------------- ---php.php--- <?php include('file.php'); ?> ---php.php--- --file.php--- ...empty... --file.php--- Expected result: ---------------- nothing Actual result: -------------- &#1087;»&#1111; -- Edit bug report at http://bugs.php.net/?id=46692&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46692&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46692&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46692&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46692&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46692&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46692&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46692&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46692&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46692&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46692&r=support Expected behavior: http://bugs.php.net/fix.php?id=46692&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46692&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46692&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46692&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46692&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46692&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46692&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46692&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46692&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46692&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46692&r=mysqlcfg

« previous php.doc.bugs (#1548) next »