note 86693 added to function.basename

From: Date: Thu, 30 Oct 2008 03:05:56 +0000
Subject: note 86693 added to function.basename
Groups: php.notes 
Request: Send a blank email to php-notes+get-145959@lists.php.net to get a copy of this message
It seems there are some bugs in basename when dealing with Chinese. It is very strange when cli and mod_php show different results. =============== [yarco@localhost ~]$ php -v PHP 5.2.4 (cli) (built: Oct 16 2007 09:13:35) [yarco@localhost Public]$ php -r 'print basename("/我的音乐/音乐.mp3");' 音乐.mp3 =============== The result is right. But mod_php would cut all of it. =============== [yarco@localhost Public]$ cat <<EOF > 1.php > <?php > print basename("/我的音乐/音乐.mp3"); > ?> > EOF [yarco@localhost Public]$ curl http://localhost/~yarco/1.php .mp3 =============== ---- Server IP: 210.51.44.91 Probable Submitter: 222.69.230.94 ---- Manual Page -- http://www.php.net/manual/en/function.basename.php Edit -- https://master.php.net/note/edit/86693 Del: integrated -- https://master.php.net/note/delete/86693/integrated Del: useless -- https://master.php.net/note/delete/86693/useless Del: bad code -- https://master.php.net/note/delete/86693/bad+code Del: spam -- https://master.php.net/note/delete/86693/spam Del: non-english -- https://master.php.net/note/delete/86693/non-english Del: in docs -- https://master.php.net/note/delete/86693/in+docs Del: other reasons-- https://master.php.net/note/delete/86693 Reject -- https://master.php.net/note/reject/86693 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145959) next »