#46692 [Opn->Bgs]: include function outputs unwanted 3 byte chars (п�ї)

From: Date: Thu, 27 Nov 2008 15:52:01 +0000
Subject: #46692 [Opn->Bgs]: include function outputs unwanted 3 byte chars (п�ї)
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1552@lists.php.net to get a copy of this message
ID: 46692 Updated by: rquadling@php.net -Summary: include function outputs unwanted 3 byte chars (&#1087;»&#1111;) Reported By: aleks dot sys at gmail dot com -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: * PHP Version: * New Comment: Your editor is saving your code with the BOM attached. I have the same issue with EditPadPro. PHP is not at fault in outputting the BOM. Previous Comments: ------------------------------------------------------------------------ [2008-11-27 08:14:52] aleks dot sys at gmail dot com Expected? In which manual it is written? I waste a whole day to understand why my table is one line below the "expected". ------------------------------------------------------------------------ [2008-11-27 00:19:44] crrodriguez at opensuse dot org what you see, is the expected behaviuor. ------------------------------------------------------------------------ [2008-11-26 20:53:19] aleks dot sys at gmail dot com 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 this bug report at http://bugs.php.net/?id=46692&edit=1

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