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

From: Date: Fri, 26 Jun 2015 09:29:25 +0000
Subject: Bug #69937 [NEW]: zend.multibyte does not work with UTF-8 PHP files
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193900@lists.php.net to get a copy of this message
From:             daniel dot marschall at rinntech dot com
Operating system: Windows 7
PHP version:      5.6.10
Package:          *General Issues
Bug Type:         Bug
Bug description:zend.multibyte does not work with UTF-8 PHP files

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 bug report at https://bugs.php.net/bug.php?id=69937&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=69937&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=69937&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=69937&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=69937&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=69937&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=69937&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=69937&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=69937&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=69937&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=69937&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=69937&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=69937&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=69937&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69937&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=69937&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=69937&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=69937&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69937&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=69937&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=69937&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#193900) next »