#37268 [Opn->WFx]: basename() doesnt work with non-latin first letters of the file.
| From: | tony2001@php.net | Date: | Wed, 03 May 2006 10:44:04 +0000 |
| Subject: | #37268 [Opn->WFx]: basename() doesnt work with non-latin first letters of the file. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96527@lists.php.net to get a copy of this message | ||
ID: 37268
Updated by: tony2001@php.net
Reported By: spam dot bugs dot php dot net at vano dot org
-Status: Open
+Status: Wont fix
Bug Type: Filesystem function related
Operating System: Fedora Core 4
PHP Version: 5.1.2
Previous Comments:
------------------------------------------------------------------------
[2006-05-02 00:55:17] judas dot iscariote at gmail dot com
you have to wait PHP6, it will address this problems.
------------------------------------------------------------------------
[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