#47954 [Opn->Fbk]: pathinfo() returns invalid filename for utf-8 file
| From: | jani@php.net | Date: | Mon, 13 Apr 2009 12:04:41 +0000 |
| Subject: | #47954 [Opn->Fbk]: pathinfo() returns invalid filename for utf-8 file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135767@lists.php.net to get a copy of this message | ||
ID: 47954
Updated by: jani@php.net
Reported By: top dot bagger at bk dot ru
-Status: Open
+Status: Feedback
Bug Type: *Unicode Issues
Operating System: Linux 2.6.18
PHP Version: 5.2.9
New Comment:
Please provide a proper test case. I tested this on command line and
it works just fine. (check your charset settings..)
Previous Comments:
------------------------------------------------------------------------
[2009-04-12 00:46:11] top dot bagger at bk dot ru
utf-8 strings i submitid there got replaced by entities :( The main
thing is there should be a "_" sign in filename. Then "filename" part
becomes splitted by it. If there is no "_" sign, the "filename" part is
empty.
------------------------------------------------------------------------
[2009-04-12 00:36:26] top dot bagger at bk dot ru
Description:
------------
pathinfo() function returns invalid "filename" array part for utf-8
filename
Reproduce code:
---------------
<?php
$utf8str =
"ПРИВЕТ_МЕДВЕД.mp4";
$path = pathinfo($utf8str);
var_dump($path['filename']);
?>
Expected result:
----------------
string(25)
"ПРИВЕТ_МЕДВЕД"
Actual result:
--------------
string(13) "_МЕДВЕД"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47954&edit=1