#37945 [WFx]: pathinfo() cannot handle argument with special characters like german "Umlaute"
| From: | andreas dot schmidt at stasy dot de | Date: | Wed, 28 Jun 2006 11:20:26 +0000 |
| Subject: | #37945 [WFx]: pathinfo() cannot handle argument with special characters like german "Umlaute" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98896@lists.php.net to get a copy of this message | ||
ID: 37945
User updated by: andreas dot schmidt at stasy dot de
Reported By: andreas dot schmidt at stasy dot de
Status: Wont fix
Bug Type: *Directory/Filesystem functions
Operating System: Linux
PHP Version: 5.1.4
New Comment:
This bug has nothing to do with Unicode!!!
The bug occurs when special characters like äöüé are used. These
characters are part of the ISO-8859-1 character set!
Previous Comments:
------------------------------------------------------------------------
[2006-06-28 11:08:36] tony2001@php.net
Unicode support will appear only in PHP6, you have to wait until then.
------------------------------------------------------------------------
[2006-06-28 10:46:07] andreas dot schmidt at stasy dot de
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 this bug report at http://bugs.php.net/?id=37945&edit=1