|  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
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: Assigned:
Status: No Feedback Package: Unicode Engine related
PHP Version: 6CVS-2008-06-12 (CVS) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2008-06-12 15:21 UTC]
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:
ini_set("unicode.script_encoding", "SJIS");
function &#1090;&#1077;&#1089;&#1090;() {
  echo "&#1090;&#1077;&#1089;&#1090; - ok\n";


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

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

Parse error: syntax error, unexpected $end, expecting T_STRING in C:\php6\ on line 2


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-12 16:44 UTC]
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: Mon Jun 17 10:01:32 2024 UTC