From: andreas dot schmidt at stasy dot de Operating system: Linux PHP version: 5.1.4 PHP Bug Type: *Directory/Filesystem functions Bug description: pathinfo() cannot handle argument with special characters like german "Umlaute"
Description: ------------ When pathinfo() is passed an argument which contains special characters like german Umlaute äöü or french é, the return array contains wrong informations. In case of special characters in a directory name, the value for the key "basename" will be the name of the parent directory of this directory. The script was testet in UTF-8 and ISO-8859-1 with same results. This bug occured at least with a) a 'hand rolled' PHP 5.1.4 on Apache 1.3.36 b) PHP 5.1.2 on Apache 2.0.55 (Ubuntu 6.06 package) c) PHP 5.0.3 on Apache 2.0.53 (SuSE Linux 9.3) The problem does not occur when the script is run in a Win2k environment. Furthermore it seems to be a PHP 5 bug as it did not occur when run with PHP4. Reproduce code: --------------- <?php $dir = 'demo/testdir/äöüé'; $pinfo = pathinfo($dir); echo $pinfo['basename']; ?> Expected result: ---------------- äöüé Actual result: -------------- testdir -- Edit bug report at http://bugs.php.net/?id=37945&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37945&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37945&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37945&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37945&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37945&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37945&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37945&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37945&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37945&r=support Expected behavior: http://bugs.php.net/fix.php?id=37945&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37945&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37945&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37945&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37945&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37945&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37945&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37945&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37945&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37945&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37945&r=mysqlcfg