title: Make PHP pathinfo() return the correct filename if the filename is UTF-8
body: <p>When using PHP's <code>pathinfo()</code> 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.</p>
  
  <p>Examples:<br>
  <code>pathinfo('aä.pdf')</code>returns:  </p>
  
  <pre><code>Array
  (
  [dirname] =&gt; [the dir]
  [basename] =&gt; aä.pdf
  [extension] =&gt; pdf
  [filename] =&gt; aä
  )  
  </code></pre>
  
  <p>which is fine and dandy, but <code>pathinfo('äa.pdf')</code>returns:  </p>
  
  <pre><code>Array
  (
  [dirname] =&gt; [the dir]
  [basename] =&gt; a.pdf
  [extension] =&gt; pdf
  [filename] =&gt; a
  )  
  </code></pre>
  
  <p>Which is not quite what I was expecting. Even worse, <code>pathinfo('ä.pdf')</code>returns:  </p>
  
  <pre><code>Array
  (
  [dirname] =&gt; [the dir]
  [basename] =&gt; .pdf
  [extension] =&gt; pdf
  [filename] =&gt; 
  )  
  </code></pre>
  
  <p>Why does it do this? This goes for all accented characters I have tested.</p>