Make PHP pathinfo() return the correct filename if the filename is UTF-8
问题 When using PHP's pathinfo() function on a filename known to be UTF-8, it does not return the correct value, unless there are 'normal' characters in front of the special character. Examples: pathinfo('aä.pdf') returns: Array ( [dirname] => [the dir] [basename] => aä.pdf [extension] => pdf [filename] => aä ) which is fine and dandy, but pathinfo('äa.pdf') returns: Array ( [dirname] => [the dir] [basename] => a.pdf [extension] => pdf [filename] => a ) Which is not quite what I was expecting.