#34314 [NEW]: function basename & pathinfo is wrong for chinese filename.
| From: | neo at csba dot com dot cn | Date: | Wed, 31 Aug 2005 07:24:18 +0000 |
| Subject: | #34314 [NEW]: function basename & pathinfo is wrong for chinese filename. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-84219@lists.php.net to get a copy of this message | ||
From: neo at csba dot com dot cn
Operating system: WIN2003
PHP version: 5.0.4
PHP Bug Type: Filesystem function related
Bug description: function basename & pathinfo is wrong for chinese filename.
Description:
------------
i use function basename and pathinfo proess chinese filename,
$filename = "D:\\ftpserver\\Öм¶½ÖÇò½ÌѧµÚ¶þʮһÕÐ.wmv";
echo basename($filename);
result is : .wmv
$at = pathinfo($filename);
echo $at['basename'];
reseult is : .wmv
is not Öм¶½ÖÇò½ÌѧµÚ¶þʮһÕÐ.wmv
Reproduce code:
---------------
$filename = "D:\\ftpserver\\Öм¶½ÖÇò½ÌѧµÚ¶þʮһÕÐ.wmv";
echo basename($filename);
$at = pathinfo($filename);
echo $at['basename'];
Expected result:
----------------
Öм¶½ÖÇò½ÌѧµÚ¶þʮһÕÐ.wmv
Actual result:
--------------
.wmv
--
Edit bug report at http://bugs.php.net/?id=34314&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34314&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34314&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34314&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34314&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34314&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34314&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34314&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34314&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34314&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34314&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34314&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34314&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34314&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34314&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34314&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34314&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34314&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34314&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34314&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34314&r=mysqlcfg