php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41851 Error with chinese characters
Submitted: 2007-06-29 08:48 UTC Modified: 2007-06-29 12:14 UTC
From: hsiehstanley83 at hotmail dot com Assigned:
Status: Not a bug Package: Gettext related
PHP Version: 5.2.3 OS: Windows XP
Private report: No CVE-ID: None
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 !
Your email address:
MUST BE VALID
Solve the problem:
30 + 19 = ?
Subscribe to this entry?

 
 [2007-06-29 08:48 UTC] hsiehstanley83 at hotmail dot com
Description:
------------
when a chinese charactor "??" is the last letter of a word that equals to a varibale. An error occurred.

Reproduce code:
---------------
<?php 
$test="?o??????";
echo $test;
?>

Expected result:
----------------
?o??????

Actual result:
--------------
Parse error: syntax error, unexpected $end in C:\Inetpub\wwwroot\test.php on line 4

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-29 12:03 UTC] tony2001@php.net
PHP6 will have decent Unicode support, you have to wait until it's available.
 [2007-06-29 12:07 UTC] hsiehstanley83 at hotmail dot com
So, how can I fix this?
 [2007-06-29 12:13 UTC] derick@php.net
Use UTF-8 as your file encoding.
 [2007-06-29 12:14 UTC] hsiehstanley83 at hotmail dot com
no difference.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 06:01:34 2025 UTC