Byte order Mark (BOM, UTF-8, Header)
| From: | Bernhard Zwischenbrugger | Date: | Wed, 06 Dec 2006 19:15:54 +0000 |
| Subject: | Byte order Mark (BOM, UTF-8, Header) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-245578@lists.php.net to get a copy of this message | ||
The Problem:
If I edit a php file with Microsoft Notepad and save with UTF-8 encoding
there is a problem with headers.
example:
<?php
header("Content-type: text/xml");
echo "<somexml/>";
?>
PHP tells me, that the header is already set, because of the (invisible)
BOM http://de.wikipedia.org/wiki/Byte_Order_Mark
I teach php and 50% of my students have this problems if they use UTF-8
encoding (depends on editor).
My Question:
------------
Is PHP UTF-8 ready?
Is there an other reason to stick on iso-8859-1 or ascii beside the BOM?
Is it a PHP bug, or is it a bug of the editor software?
thanks
Bernhard