ID:               29542
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ppmm at wuxinan dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Windows 2000 Prof.
 PHP Version:      5.0.0
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Works fine here, try the latest snapshot.


Previous Comments:
------------------------------------------------------------------------

[2004-08-05 23:42:35] ppmm at wuxinan dot net

Description:
------------
when path has multi-byte chars, basename() does not return correct file
basename. I did not have this problem in PHP 4.3.7. In the example,
$hehe variable has two gb2312-encoded chinese chars. This might relate
to setlocale or something like that.

Reproduce code:
---------------
$hehe = "hehe/�պ� haha kkk";
echo basename($hehe)."\n";
echo substr($hehe, strrpos($hehe, "/")+1);

Expected result:
----------------
�պ� haha kkk
�պ� haha kkk

Actual result:
--------------
 haha kkk
�պ� haha kkk


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29542&edit=1

Reply via email to