ID:               37268
 Comment by:       judas dot iscariote at gmail dot com
 Reported By:      spam dot bugs dot php dot net at vano dot org
 Status:           Open
 Bug Type:         Filesystem function related
 Operating System: Fedora Core 4
 PHP Version:      5.1.2
 New Comment:

you have to wait PHP6, it will address this problems.


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

[2006-05-01 23:56:42] spam dot bugs dot php dot net at vano dot org

Description:
------------
If a file starts with a non-latin letter (cyrillic) and not with a
non-letter character, basename will cut off the beginning of name
untill a latin letter or a non-letter character found in the name.
In my tests I was using Windows-1251 (CP1251) encoding and not UNICODE,
so, the problem is in basename() function itself not in multi-byte
charsets.


P.S. if you have problem with text encoding of the example below, you
can see a realtime example and test your own inputs there:
http://examples.vano.org/basename.php

Reproduce code:
---------------
<?php
echo basename("/test/blah/music/ðóññêèélatin.mp3");
?>

Expected result:
----------------
ðóññêèélatin.mp3

Actual result:
--------------
latin.mp3


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


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

Reply via email to