|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67681 declare(encoding='UTF-8') causes "Warning: Unexpected character in input"
Submitted: 2014-07-25 00:27 UTC Modified: 2014-07-25 05:08 UTC
Avg. Score:3.0 ± 1.4
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: dqneoo at gmail dot com Assigned:
Status: Verified Package: Scripting Engine problem
PHP Version: PHP5.4,5.5,5.6,5.7dev OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
15 + 26 = ?
Subscribe to this entry?

 [2014-07-25 00:27 UTC] dqneoo at gmail dot com
declare(encoding='UTF-8'); causes Warning under the environment of 
zend.multibyte=On and mbstring.internal_encoding="EUC_JP"

Test script:
// あああ

$ ./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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-25 00:29 UTC] dqneoo at gmail dot com
-PHP Version: master-Git-2014-07-24 (Git) +PHP Version: PHP5.4,5.5,5.6,5.7dev
 [2014-07-25 00:29 UTC] dqneoo at gmail dot com
specify php version
 [2014-07-25 05:08 UTC]
-Status: Open +Status: Verified
 [2014-07-25 05:08 UTC]
When zend.multibyte became runtime option, it was messed up. Related to zend multibyte XFAIL tests in mbstring.
 [2017-06-18 11:58 UTC] qdinar at gmail dot com
i have same problem with php 5.5.34.

but problem appears at last line of script, and i had not ending "?>" . when i put it, warning disappeared.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 02:03:40 2023 UTC