|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42074 Compile fails with a certain Kanji and document in Shift JIS
Submitted: 2007-07-23 05:49 UTC Modified: 2007-07-23 09:14 UTC
From: cs at tequila dot co dot jp Assigned:
Status: Wont fix Package: *Languages/Translation
PHP Version: 5.2.3 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: cs at tequila dot co dot jp
New email:
PHP Version: OS:


 [2007-07-23 05:49 UTC] cs at tequila dot co dot jp
If the document itself is saved in Shift_JIS and the kanji for talent (nou) 能 is used at the end of a string then you get all kind of compile errors. But if you put any character after this kanji, then the compile succeeds.

Reproduce code:
	header("Content-type: text/html; charset=ShiftJIS");
	$var = '&#33021;';

	echo $var.'<br>';

Actual result:
Parse error: syntax error, unexpected '>' in kanji_test_1.php on line 5


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-23 09:14 UTC]
This will be fixed for PHP 6. (and maybe it works if you build PHP using --enable-zend-multibyte)
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Sep 30 22:05:55 2022 UTC