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

From: Date: Thu, 27 Nov 2008 08:14:53 +0000
Subject: #46692 [Opn]: include function outputs unwanted 3 byte chars (п»ї)
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1550@lists.php.net to get a copy of this message
 ID:               46692
 User updated by:  aleks dot sys at gmail dot com
 Reported By:      aleks dot sys at gmail dot com
 Status:           Open
 Bug Type:         Documentation problem
-Operating System: Windows XP
+Operating System: *
-PHP Version:      Irrelevant
+PHP Version:      *
 New Comment:

Expected? In which manual it is written?
I waste a whole day to understand why my table is one line below the
"expected".


Previous Comments:
------------------------------------------------------------------------

[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



Thread (5 messages)

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