note 71997 added to function.basename

From: Date: Thu, 28 Dec 2006 10:58:33 +0000
Subject: note 71997 added to function.basename
Groups: php.notes 
Request: Send a blank email to php-notes+get-120977@lists.php.net to get a copy of this message
the php basename function is not UTF-8 proof: $fn = "dir/été.txt"; $bn = basename($fn); will return té.txt php-5.1.3-1 locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= you may use the shell basename function, which works fine. suomi ---- Server IP: 194.153.94.10 Probable Submitter: 195.141.97.126 ---- Manual Page -- http://www.php.net/manual/en/function.basename.php Edit -- https://master.php.net/note/edit/71997 Del: integrated -- https://master.php.net/note/delete/71997/integrated Del: useless -- https://master.php.net/note/delete/71997/useless Del: bad code -- https://master.php.net/note/delete/71997/bad+code Del: spam -- https://master.php.net/note/delete/71997/spam Del: non-english -- https://master.php.net/note/delete/71997/non-english Del: in docs -- https://master.php.net/note/delete/71997/in+docs Del: other reasons-- https://master.php.net/note/delete/71997 Reject -- https://master.php.net/note/reject/71997 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120977) next »