Bug #62119 [NEW]: basename broken with non-ASCII-chars
| From: | thomas dot hebinck at digionline dot de | Date: | Wed, 23 May 2012 08:38:45 +0000 |
| Subject: | Bug #62119 [NEW]: basename broken with non-ASCII-chars | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-170702@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux/Ubuntu
PHP version: 5.3.13
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:basename broken with non-ASCII-chars
Description:
------------
With the default locale setting "C", basename() drops non-ASCII-chars at
the beginning of a filename.
Test script:
---------------
$path='/test/äaä.txt';
echo $path."\n";
setlocale(LC_ALL,'C');
echo dirname($path).'/'.basename($path)."\n";
setlocale(LC_ALL,'en_US.iso885915'); // bash: locale -a
echo dirname($path).'/'.basename($path)."\n";
Expected result:
----------------
/test/äaä.txt
/test/äaä.txt
/test/äaä.txt
Actual result:
--------------
/test/äaä.txt
/test/aä.txt
/test/äaä.txt
--
Edit bug report at https://bugs.php.net/bug.php?id=62119&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62119&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62119&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62119&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62119&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62119&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62119&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62119&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62119&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62119&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62119&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62119&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62119&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62119&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62119&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62119&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62119&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62119&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62119&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62119&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62119&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62119&r=mysqlcfg