Bug #69937 [Com]: zend.multibyte does not work with UTF-8 PHP files

From: Date: Fri, 26 Jun 2015 09:31:15 +0000
Subject: Bug #69937 [Com]: zend.multibyte does not work with UTF-8 PHP files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193901@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69937&edit=1

 ID:                 69937
 Comment by:         daniel dot marschall at rinntech dot com
 Reported by:        daniel dot marschall at rinntech dot com
 Summary:            zend.multibyte does not work with UTF-8 PHP files
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 Operating System:   Windows 7
 PHP Version:        5.6.10
 Block user comment: N
 Private report:     N

 New Comment:

(In the report I mixed up actual and expected result.)


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#193901) next »