php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45248 Shfift_JIS encoded characters in PHP script cause an error.
Submitted: 2008-06-12 15:21 UTC Modified: 2008-08-20 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: hirokawa@php.net Assigned:
Status: No Feedback Package: Unicode Engine related
PHP Version: 6CVS-2008-06-12 (CVS) OS: *
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: hirokawa@php.net
New email:
PHP Version: OS:

 

 [2008-06-12 15:21 UTC] hirokawa@php.net
Description:
------------
Shift_JIS encoded characters in PHP script 
cause an error. 

A tiny script causes the problem.
It is based on php6/tests/unicode/enc-SJIS.phpt.
For UTF-8 or EUC-JP encoded script, it works fine.




Reproduce code:
---------------
enc-SJIS.php 
<?php
ini_set("unicode.script_encoding", "SJIS");
include("enc-SJIS.inc");
?>

enc-SJIS.inc
<?php
function &#1090;&#1077;&#1089;&#1090;() {
  echo "&#1090;&#1077;&#1089;&#1090; - ok\n";
}

&#1090;&#1077;&#1089;&#1090;();
?>


Expected result:
----------------
&#1090;&#1077;&#1089;&#1090; - ok

Actual result:
--------------
Warning: Illegal or truncated character in input: offset 0, state=0 in C:\php6\enc-SJIS.inc on line 2

Parse error: syntax error, unexpected $end, expecting T_STRING in C:\php6\enc-SJIS.inc on line 2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-12 16:44 UTC] jani@php.net
See also bug #45087 (submitted twice..? :)
 [2008-08-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC