Use this function in place of pathinfo to make it work with UTF-8 encoded file names too
<?php
function mb_pathinfo($filepath) {
preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im',$filepath,$m);
if($m[1]) $ret['dirname']=$m[1];
if($m[2]) $ret['basename']=$m[2];
if($m[5]) $ret['extension']=$m[5];
if($m[3]) $ret['filename']=$m[3];
return $ret;
}
?>