php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42312 BOM mark interpreted as output
Submitted: 2007-08-15 14:59 UTC Modified: 2007-08-16 10:25 UTC
Votes:5
Avg. Score:3.0 ± 1.8
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: draconpern at hotmail dot com Assigned:
Status: Wont fix Package: I18N and L10N related
PHP Version: 5.2.3 OS: FreeBSD
Private report: No CVE-ID: None
 [2007-08-15 14:59 UTC] draconpern at hotmail dot com
Description:
------------
BOM marks on utf files are interpreted as output.  So any php script that has to output before any file content has problems.  This is not a duplicate of bug #22247.  Instead, BOM should be passed through to output, but not interpreted as output.

Expected result:
----------------
Any php file with BOM.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-15 15:40 UTC] jani@php.net
And how isn't this exactly same what bug #22247 is about?
Or bug #22108 ? 
 [2007-08-15 19:49 UTC] draconpern at hotmail dot com
All the other bugs suggested ignoring/discarding the output which is incorrect.  The correct action should be to read the script, and save the BOM.  Do the header processing, and then output the BOM as part of the output content.
 [2007-08-16 06:25 UTC] jani@php.net
And using --enable-zend-multibyte does not work for you?

 [2007-08-16 10:03 UTC] draconpern at hotmail dot com
Anyway to enable that option without doing a recompile?  Also, isn't it still experimental? Hence not on by default.

Also, different BOM gives different results.  Using utf16 encoded files results in a correct bom but then unable to parse the code. Where as utf8 just gives the output warning.
 [2007-08-16 10:25 UTC] jani@php.net
As was said in the other referred bug reports: Either use --enable-zend-multibyte or wait for PHP 6 which has real unicode support. This will not change for PHP 5.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC