title: Replace unicode character
body: <p>I am trying to replace a certain character in a string with another.  They are quite obscure latin characters.  I want to replace character (hex) 259 with 4d9, so I tried this:</p>
  
  <pre><code>str_replace("\x02\x59","\x04\xd9",$string);
  </code></pre>
  
  <p>This didn't work.  How do I go about this?</p>
  
  <p>**EDIT: Additional information.</p>
  
  <p>Thanks bobince, that has done the trick.  Although, I want to replace the uppercase schwa also and it is not working for some reason.  I calculated U+018F (Ə) as UTF-8 0xC68F and this is to be replaced with U+04D8 (0xD398):</p>
  
  <pre><code>$string = str_replace("\xC9\x99", "\xD3\x99", $_POST['string_with_schwa']); //lc 259-&gt;4d9
  $string = str_replace( "\xC6\8F", "\xD3\x98" , $string); //uc 18f-&gt;4d8
  </code></pre>
  
  <p>I am copying the 'Ə' into a textbox and posting it.  The first <code>str_replace</code> works fine on the lowercase, but does not detect the uppercase in the second <code>str_replace</code>, strange.  It remains as U+018F.  Guess I could run the string through <code>strtolower</code> but this should work though.</p>