Bug #67681 [Opn->Ver]: declare(encoding='UTF-8') causes "Warning: Unexpected character in input"

From: Date: Fri, 25 Jul 2014 05:08:51 +0000
Subject: Bug #67681 [Opn->Ver]: declare(encoding='UTF-8') causes "Warning: Unexpected character in input"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186809@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67681&edit=1

 ID:                 67681
 Updated by:         yohgaki@php.net
 Reported by:        dqneoo at gmail dot com
 Summary:            declare(encoding='UTF-8') causes "Warning:
                     Unexpected character in input"
-Status:             Open
+Status:             Verified
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Linux
 PHP Version:        PHP5.4,5.5,5.6,5.7dev
 Block user comment: N
 Private report:     N

 New Comment:

When zend.multibyte became runtime option, it was messed up. Related to zend multibyte XFAIL tests
in mbstring.


Previous Comments:
------------------------------------------------------------------------
[2014-07-25 00:29:25] dqneoo at gmail dot com

specify php version

------------------------------------------------------------------------
[2014-07-25 00:27:43] dqneoo at gmail dot com

Description:
------------
declare(encoding='UTF-8'); causes Warning under the environment of 
zend.multibyte=On and mbstring.internal_encoding="EUC_JP"


Test script:
---------------
a.php
-----
<?php
declare(encoding='UTF-8');
// あああ
-----

$ ./configure --enable-mbstring --enable-debug
$ make
$ ./sapi/cli/php -d zend.multibyte=On -d mbstring.internal_encoding="EUC_JP"  a.php


Expected result:
----------------
No warnings

Actual result:
--------------
Warning: Unexpected character in input:  ' in /home/vagrant/src/php-src/a.php on line 4

Warning: Unexpected character in input:  ' in /home/vagrant/src/php-src/a.php on line 4

Warning: Unexpected character in input:  ' in /home/vagrant/src/php-src/a.php on line 4


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67681&edit=1


Thread (4 messages)

« previous php.bugs (#186809) next »