From:
Operating system: Debian Squeeze
PHP version: 5.3.4
Package: Filesystem function related
Bug Type: Bug
Bug description:pathinfo() does not return correct values for path with accents
in it
Description:
------------
NOTE: phpinfo() lists the PHP version as 5.3.3-6
when using pathinfo() on a path, say, '/tmp/ë.txt', it will not give the
correct
filename and basename (but will give the correct path).
Test script:
---------------
// will function correctly
print_r(pathinfo('/var/tmp/aëä.txt'));
// will leave out the first ë
print_r(pathinfo('/var/tmp/ëaä.txt'));
//will leave out ëä
print_r(pathinfo('/var/tmp/ëäa.txt'));
Expected result:
----------------
Array
(
[dirname] => /var/tmp
[basename] => aëä.txt
[extension] => txt
[filename] => aëä
)
Array
(
[dirname] => /var/tmp
[basename] => ëaä.txt
[extension] => txt
[filename] => ëaä
)
Array
(
[dirname] => /var/tmp
[basename] => ëäa.txt
[extension] => txt
[filename] => ëäa
)
Actual result:
--------------
Array
(
[dirname] => /var/tmp
[basename] => aëä.txt
[extension] => txt
[filename] => aëä
)
Array
(
[dirname] => /var/tmp
[basename] => aä.txt
[extension] => txt
[filename] => aä
)
Array
(
[dirname] => /var/tmp
[basename] => a.txt
[extension] => txt
[filename] => a
)
--
Edit bug report at http://bugs.php.net/bug.php?id=53557&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53557&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53557&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=53557&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53557&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=53557&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53557&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=53557&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=53557&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=53557&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=53557&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=53557&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=53557&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=53557&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53557&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53557&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53557&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=53557&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=53557&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=53557&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=53557&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=53557&r=mysqlcfg