#33273 [Bgs]: Use of certain kanji characters make PHP crash

From: Date: Wed, 08 Jun 2005 14:27:42 +0000
Subject: #33273 [Bgs]: Use of certain kanji characters make PHP crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80062@lists.php.net to get a copy of this message
ID: 33273 User updated by: lars dot jensen at careercross dot com Reported By: lars dot jensen at careercross dot com Status: Bogus Bug Type: Arrays related Operating System: FreeBSD 5.3 PHP Version: 5.0.3 New Comment: Any idea when to expect support for this ? Will need to develop a workaround tomorrow anyway as we need the given kanji's in the included language file Previous Comments: ------------------------------------------------------------------------ [2005-06-08 16:24:32] derick@php.net So this is not a bug as PHP simply doesn't support this yet. ------------------------------------------------------------------------ [2005-06-08 16:23:46] derick@php.net It's because in latin one it looks like this: 'One Text'=>'‹@”\', you see the \ in the last char 能 escaping the '. ------------------------------------------------------------------------ [2005-06-08 16:21:24] lars dot jensen at careercross dot com This was a very stripped down version, if I exchange the kanji with say "abc", it works fine. It also works with other kanji sequences, katakana, hiragana ect. These two samples is the only two out of about 75 causing problems ------------------------------------------------------------------------ [2005-06-08 16:20:07] derick@php.net Nicholas, that is bullshit. You can have trailing comma's in arrays - just like in C. And Unicode is also not added in PHP 5 or PHp 5.1. Please refrain from commenting if you're not 100% sure about things. ------------------------------------------------------------------------ [2005-06-08 16:17:56] nick dot telford at ntlworld dot com If that source is causing that error it's not because of the kanji sequences. You've got an extra comma (,) at the end of your array() statement. Your code: $foo = array ( 'One Text' => 'some kanji', 'Another Text' => 'more kanji', ); The last comma, should not be present, as PHP expects another argument to follow it. Simply remove it: $foo = array ( 'One Text' => 'some kanji', 'Another Text' => 'more kanji' ); On a related note, if you wish to code using non-western character sets, full Unicode support is being added into PHP5 (most likely, the next major release after 5.1 will have it). This should be of great use to you when it's released. Nicholas Telford ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/33273 -- Edit this bug report at http://bugs.php.net/?id=33273&edit=1

« previous php.bugs (#80062) next »