From: svmk-tmsk at yandex dot ru Operating system: Linux svmk-laptop 3.8.0-23-gener PHP version: 5.4Git-2013-06-08 (Git) Package: Filesystem function related Bug Type: Bug Bug description:Function basename works icorrect with spaces
Description: ------------ PHP version - PHP 5.4.9-4ubuntu2 (cli) (built: Mar 11 2013 16:05:09) Function basename works incorrect with spaces in cyrillic encoding. This function separates filename by a space. For example basename("www/abc defg") = "defg". It should be "abc defg". The letters should be in Cyrillic like 'абв где'. 1. Set locale ru_RU.UTF-8 2. Run this code echo basename('абв где'); 3. basename return 'где'. basename must return 'абв где'. Test script: --------------- echo basename('абв где'); Expected result: ---------------- baseline function should't divide string by space. Actual result: -------------- basename('пÑÑÑ Ð´Ð¾ каÑалога/абв где') = 'где' -- Edit bug report at https://bugs.php.net/bug.php?id=64995&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64995&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64995&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64995&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64995&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64995&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64995&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64995&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64995&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64995&r=support Expected behavior: https://bugs.php.net/fix.php?id=64995&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64995&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64995&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64995&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64995&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64995&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64995&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64995&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64995&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64995&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64995&r=mysqlcfg