title: Does preg_replace() change my character set?
body: <p>I have the following piece of code which seems to be changing my character set.</p>
  
  <pre><code>     $html = "à";
       echo $html;  // result: à
       $html = preg_replace("/\s/", "", $html);
       echo $html;  // result: ?
  </code></pre>
  
  <p>However, when I use <code>[\t\n\r\f\v]</code> as my pattern instead of the special character <code>\s</code> it works fine:</p>
  
  <pre><code>     $html = "à";
       echo $html;  // result: à
       $html = preg_replace("/[\t\n\r\f\v]/", "", $html);
       echo $html;  // result: à
  </code></pre>
  
  <p>Why is that?</p>