title: PHP: Replacing funny character on PHP
body: <p>I'm trying to replace string "Red Dwarf (TV Series 1988â€") - IMDb" to "Red Dwarf (TV Series 1988') - IMDb"</p>
  
  <p>I have a translation table of these funny characters in an array. I tried to replace them using: str_replace but it did not work. Can anybody suggest a workaround on this? This is the snippet of the code:</p>
  
  <pre><code>function replaceFunnyChar( $input ){
  
  $translation = array(
      'â€™' =&gt; "'",
      "â€\"" =&gt; '-',
      'Ã©' =&gt; 'é',
      'Ã¨' =&gt; 'è',
      'â€œ' =&gt; '"',
      'â€' =&gt; '"',
      'â€˜' =&gt; "'",
      'Ã¢' =&gt; 'ã',
      'Ã"' =&gt; 'ä',
      'â€"' =&gt; '–',
      'Ä«' =&gt; 'ī',
      'é˜´' =&gt; '阴',
      'é™°' =&gt; '陰',
      "é˜³" =&gt; "阳",
      "é™½" =&gt; "陽",
      'Â´' =&gt; "'",
      'Ã¼' =&gt; 'ü',
      "Ã,Ã'" =&gt; "'",
      'â€¢' =&gt; '–'
  );
  
  
  foreach( $translation as $find =&gt; $replace ){
      $output = str_replace($find, $replace, $input );    
      //$output = preg_replace("/" . $find . "/", $replace, $input );
  }
  return $output;
  }
  </code></pre>