title: How to convert this string manipulation function UTF-8 Compatible in PHP?
body: <p>I had trouble finding a function that does exactly what I am looking for. Unfortunatly, this function isn't UTF-8 compatible. This functions is like a basic <code>ucwords</code> but it also does the uppercase on a character followed by one of the given characters found (in my case I need to apply an uppercase on the character found after a <code>-</code>).</p>
  
  <p>Here is the function:</p>
  
  <pre><code>&lt;?php
  function my_ucwords($string)
    {
      $noletters='"([/-'; //add more if u need to
      for($i=0; $i&lt;strlen($noletters); $i++)
        $string = str_replace($noletters[$i], $noletters[$i].' ', $string);
      $string=ucwords($string);
      for($i=0; $i&lt;strlen($noletters); $i++)
        $string = str_replace($noletters[$i].' ', $noletters[$i], $string);
      return $string;
    }
  
  $title = 'ELVIS "THE KING" PRESLEY - (LET ME BE YOUR) TEDDY BEAR';
  echo my_ucwords(strtolower($title));
  ?&gt;
  </code></pre>
  
  <p>As soon as I add accents to my string, e.g.:</p>
  
  <pre><code>echo my_ucwords(strtolower( "saint-étienne" )) //return: Saint- instead of Saint-Étienne
  </code></pre>
  
  <p>Any idea? I know instead of the <code>strlen</code> I could use <code>mb_strlen</code>. But what about the others?</p>
  
  <p><strong>Edit:</strong>
  Just a reminder that I do not only need a simple <code>ucwords</code> working in <code>UTF-8</code>. I need it to apply the uppercase on any character found after a <code>-</code>.</p>
  
  <p>I'm still trying to figure it out by myself, too.</p>