Re: PHP5.3.0-dev and Unicode BOM.
| From: | Adam Harvey | Date: | Wed, 05 Mar 2008 14:14:12 +0000 |
| Subject: | Re: PHP5.3.0-dev and Unicode BOM. | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35973@lists.php.net to get a copy of this message | ||
Quoting Stefan Walk <et@php.net>:
Additionally, i don't think PHP has ignored the BOM before.Bug #22108 [1] has the gory details. The gist is that this behaves differently depending on whether PHP was configured with --enable-zend-multibyte. With the option, the BOM is parsed, used to detect which UTF encoding is in use, and then discarded. Without the option, it's treated like any other non-PHP content and echoed to stdout. A (very) quick test of the latest PHP 6 snapshot suggests that the current behaviour there is the same as PHP 5 without --enable-zend-multibyte: just output the BOM to stdout without any special handling. It's entirely possible that I've just missed a Unicode-related option there, though. Adam [1] http://bugs.php.net/bug.php?id=22108 -- Adam Harvey PEAR Profile: <http://pear.php.net/user/aharvey> Blog: <http://xn--9bi.net/>