#30014 [Fbk->NoF]: pathinfo() doesn't handle multibyte path
| From: | sniper@php.net | Date: | Sun, 20 Mar 2005 17:04:19 +0000 |
| Subject: | #30014 [Fbk->NoF]: pathinfo() doesn't handle multibyte path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75582@lists.php.net to get a copy of this message | ||
ID: 30014
Updated by: sniper@php.net
Reported By: cvictor at pchome dot com dot tw
-Status: Feedback
+Status: No Feedback
Bug Type: Directory function related
Operating System: Windows XP Pro
PHP Version: 5.0.1
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2005-03-07 21:17:15] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-09-30 03:27:23] ppmm at wuxinan dot net
partial summary of bug # 29542 30014 30105:
this bug confirmed to exist on:
simplified chinese windows 2000
traditional chinese windows xp pro
redhat 9 (default rpm's)
this bug confirmed not to exist on:
fedora core 3 test 1 (default rpm's)
english windows xp pro
------------------------------------------------------------------------
[2004-09-30 03:22:30] ppmm at wuxinan dot net
related to bug# 30105
http://bugs.php.net/bug.php?id=30105
------------------------------------------------------------------------
[2004-09-07 20:26:26] cvictor at pchome dot com dot tw
Description:
------------
pathinfo() doesn't handle pathname in multibyte well. This error can be
reporduced under big5 and utf-8 charset, no matter converting the whole
source php file or using mb_convert_encoding() inline.
This error only occurs when the first character of basename is a
Chinese character.
I didn't recompile PHP bin, and modules used seem not relevent. My
php.ini is adapted from php.ini-recommended. The OS is a Traditional
Chinese version.
Reproduce code:
---------------
<?php
$fp = '/var/©ú²Ó.txt';
var_dump(pathinfo($fp));
$fp = '/var/a©ú²Ó.txt';
var_dump(pathinfo($fp));
?>
Expected result:
----------------
array(3) {
["dirname"]=>
string(4) "/var"
["basename"]=>
string(8) "©ú²Ó.txt"
["extension"]=>
string(3) "txt"
}
array(3) {
["dirname"]=>
string(4) "/var"
["basename"]=>
string(8) "a©ú²Ó.txt"
["extension"]=>
string(3) "txt"
}
Actual result:
--------------
array(3) {
["dirname"]=>
string(4) "/var"
["basename"]=>
string(4) ".txt"
["extension"]=>
string(3) "txt"
}
array(3) {
["dirname"]=>
string(4) "/var"
["basename"]=>
string(8) "a©ú²Ó.txt"
["extension"]=>
string(3) "txt"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30014&edit=1