Bug #69937 [Opn->Nab]: zend.multibyte does not work with UTF-8 PHP files
Edit report at https://bugs.php.net/bug.php?id=69937&edit=1
ID: 69937
Updated by: cmb@php.net
Reported by: daniel dot marschall at rinntech dot com
Summary: zend.multibyte does not work with UTF-8 PHP files
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Windows 7
PHP Version: 5.6.10
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
zend.multibyte is neither required for UTF-8 encoded source files
nor is it supposed to strip BOMs. Simply save your files without
BOM.
Previous Comments:
------------------------------------------------------------------------
[2015-06-26 09:31:15] daniel dot marschall at rinntech dot com
(In the report I mixed up actual and expected result.)
------------------------------------------------------------------------
[2015-06-26 09:29:24] daniel dot marschall at rinntech dot com
Description:
------------
In the PHP.ini I have changed "zend.multibyte = On". Running phpinfo() shows that the
value was changed.
But the UTF8 BOM of the PHP file is still sent to the client. Google Chrome has a very buggy
behavior when it is receiving a BOM in front of <html> .
(Note: "mbstring.internal_encoding" is set to default)
Test script:
---------------
(This test script is written in ASCII representation - see the BOM!)
<?php
// Just a demonstration to show that the UTF-8 BOM was actually sent
flush();
header('abc:def'); // will fail, because of the previously sent BOM
// Now check that the change in the PHP file did work.
var_dump(ini_get('zend.multibyte')); // string(1) "1"
?>
Expected result:
----------------
Warning: Cannot modify header information - headers already sent ...
string(1) "1"
Actual result:
--------------
string(1) "1"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69937&edit=1
Thread (3 messages)