|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2009-04-12 00:36 UTC] 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) "_МЕДВЕД" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 13:00:01 2025 UTC | 
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!