Re: Byte order Mark (BOM, UTF-8, Header)
| From: | Jon Anderson | Date: | Wed, 06 Dec 2006 19:30:06 +0000 |
| Subject: | Re: Byte order Mark (BOM, UTF-8, Header) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245579@lists.php.net to get a copy of this message | ||
Bernhard Zwischenbrugger wrote:.
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? My opinion is that it is basically a code problem. You have data before the "<?php" (the BOM), and PHP is outputting it as such. How is PHP supposed to know that you didn't intend to ouput a BOM? It could be an intentional thing, e.g. output of a UTF-8 text file:<?php header('Content-type: text/plain; charset=utf-8'); include('file-with-BOM.php'); In your case, it is an unwanted side-effect. The answer, I believe, should be to educate your student about the BOM and recommend the use of an editor that is a little smarter about UTF-8 output. When I use Windows (which is rarely), I use Notepad++, which gives you the option to save files as UTF-8 with or without the BOM. jon