Doc #53557 [Opn->Csd]: pathinfo() does not return correct values for path with accents in it
| From: | kalle@php.net | Date: | Mon, 20 Dec 2010 02:04:33 +0000 |
| Subject: | Doc #53557 [Opn->Csd]: 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-5703@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: kalle@php.net
Reported by: joris at notenbomer dot nl
Summary: pathinfo() does not return correct values for path
with accents in it
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Filesystem function related
Operating System: Debian Squeeze
PHP Version: 5.3.4
-Assigned To:
+Assigned To: kalle
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2010-12-20 03:04:29] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=306483
Log: Fixed bug #53557 (pathinfo() does not return correct values for
path with accents in it)
------------------------------------------------------------------------
[2010-12-16 18:14:57] cataphract@php.net
This is a locale issue; see the note in basename(); it should probably
be copied to the page for pathinfo.
------------------------------------------------------------------------
[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