ID: 47954 Comment by: brunner dot adam at gmail dot com Reported By: top dot bagger at bk dot ru Status: No Feedback Bug Type: *Unicode Issues Operating System: Linux 2.6.18 PHP Version: 5.2.9 New Comment:
Can confirm on Linux with PHP 5.2.9 var_dump(pathinfo("foobar.ext", PATHINFO_FILENAME)); // string(6) "foobar" var_dump(pathinfo("főoobar.ext", PATHINFO_FILENAME)); //string(8) "fÅoobar" var_dump(pathinfo("őoobar.ext", PATHINFO_FILENAME)); //string(5) "oobar" This works well in CLI mode! Previous Comments: ------------------------------------------------------------------------ [2009-04-21 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-04-13 12:04:37] j...@php.net Please provide a proper test case. I tested this on command line and it works just fine. (check your charset settings..) ------------------------------------------------------------------------ [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