title: Why does Rails 3 think xE2x80x89 means â x80 x89
body: <p>I have a field scraped from a utf-8 page:</p>
  
  <pre><code>"O’Reilly"
  </code></pre>
  
  <p>And saved in a yml file:</p>
  
  <pre><code>:name: "O\xE2\x80\x99Reilly"
  </code></pre>
  
  <p>(xE2x80x99 is the <a href="http://www.fileformat.info/info/unicode/char/2019/index.htm" rel="nofollow">correct UTF-8 representation of this apostrophe</a>)</p>
  
  <p>However when I load the value into a hash and yield it to a page tagged as utf-8, I get:</p>
  
  <pre><code>OâReilly
  </code></pre>
  
  <p>I looked up the character â, which is encoded in UTF-16 as x00E2, and the characters x80 and x89 were invisible but present after the â when I pasted the string. I assume this means my app is outputting three UTF-16 characters instead of one UTF-8.</p>
  
  <p>How do I make rails interpret a 3-byte UTF-8 code as a single character?</p>