#50028 [Opn]: dirname bug
| From: | kalle@php.net | Date: | Sat, 31 Oct 2009 14:00:50 +0000 |
| Subject: | #50028 [Opn]: dirname bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-144126@lists.php.net to get a copy of this message | ||
ID: 50028
Updated by: kalle@php.net
Reported By: zgq0301 at gmail dot com
Status: Open
Bug Type: Filesystem function related
Operating System: *
PHP Version: 5.2.11
New Comment:
sjoerd> Thats bugsweb causing that on unicode characters, first they
are converted to entities and then the & is escaped into &. So it
ends up with &#XXXX; =)
Previous Comments:
------------------------------------------------------------------------
[2009-10-29 19:55:50] sjoerd@php.net
Thank you for your bug report.
You have html entities in your filename. Html entities are not
automatically decoded when used in filenames.
------------------------------------------------------------------------
[2009-10-29 00:49:31] zgq0301 at gmail dot com
Description:
------------
function dirname can't return a string which the last character is
chinese.
Reproduce code:
---------------
---
From manual page: function.dirname#Description
---
code:
$file="D:\Backup\我的文档\网站根目录d\cms";
echo dirname($file);
then it print D:\Backup;
but when I add a english character:
$file="D:\Backup\我的文档\网站根目录d\cms";
echo dirname($file);
it can well done.
Expected result:
----------------
code:
$file="D:\Backup\我的文档\网站根目录d\cms";
echo dirname($file);
then it print D:\Backup;
but when I add a english character:
$file="D:\Backup\我的文档\网站根目录d\cms";
echo dirname($file);
it can well done.
Actual result:
--------------
code:
$file="D:\Backup\我的文档\网站根目录d\cms";
echo dirname($file);
then it print D:\Backup;
but when I add a english character:
$file="D:\Backup\我的文档\网站根目录d\cms";
echo dirname($file);
it can well done.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50028&edit=1