note 99797 added to function.dirname

From: Date: Tue, 07 Sep 2010 16:51:26 +0000
Subject: note 99797 added to function.dirname
Groups: php.notes 
Request: Send a blank email to php-notes+get-172365@lists.php.net to get a copy of this message
In some situations (I can't locate the dependencies) basename and dirname may return incorrect values if parsed string is in UTF-8. Like, dirname("glossary/задний-фокус") will return "glossary" and basename("glossary/задний-фокус") will return "-фокус". Quickfix is str_replace("!$!", "", dirname(str_replace("/", "!$!/!$!", $q))) ---- Server IP: 195.54.192.44 Probable Submitter: 127.0.0.1 ---- Manual Page -- http://www.php.net/manual/en/function.dirname.php Edit -- https://master.php.net/note/edit/99797 Del: integrated -- https://master.php.net/note/delete/99797/integrated Del: useless -- https://master.php.net/note/delete/99797/useless Del: bad code -- https://master.php.net/note/delete/99797/bad+code Del: spam -- https://master.php.net/note/delete/99797/spam Del: non-english -- https://master.php.net/note/delete/99797/non-english Del: in docs -- https://master.php.net/note/delete/99797/in+docs Del: other reasons-- https://master.php.net/note/delete/99797 Reject -- https://master.php.net/note/reject/99797 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172365) next »