Bug->Doc #53557 [Opn]: pathinfo() does not return correct values for path with accents in it

From: Date: Thu, 16 Dec 2010 17:14:59 +0000
Subject: Bug->Doc #53557 [Opn]: pathinfo() does not return correct values for path with accents in it
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5687@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53557&edit=1 ID: 53557 Updated by: cataphract@php.net Reported by: joris at notenbomer dot nl Summary: pathinfo() does not return correct values for path with accents in it Status: Open -Type: Bug +Type: Documentation Problem Package: Filesystem function related Operating System: Debian Squeeze PHP Version: 5.3.4 Block user comment: N Private report: N New Comment: This is a locale issue; see the note in basename(); it should probably be copied to the page for pathinfo. Previous Comments: ------------------------------------------------------------------------ [2010-12-16 16:03:54] joris at notenbomer dot nl 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 this bug report at http://bugs.php.net/bug.php?id=53557&edit=1

« previous php.doc.bugs (#5687) next »