php.net |  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
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:
MUST BE VALID
Solve the problem:
10 + 38 = ?
Subscribe to this entry?

 
 [2007-07-23 05:49 UTC] cs at tequila dot co dot jp
Description:
------------
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-23 09:14 UTC] jani@php.net
This will be fixed for PHP 6. (and maybe it works if you build PHP using --enable-zend-multibyte)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC