title: Ruby and encoding conversion
body: <p>I'm importing a CSV file into Ruby (1.8.7). File.open('path/to/file.csv').read returns this in the console:</p>
  
  <pre><code>Stefan,Engstr\232m
  </code></pre>
  
  <p>The encoding is identified as iso-8859-2 by UniversalDetector (chardet gem).</p>
  
  <pre><code>UniversalDetector::chardet("Stefan,Engstr\232m")
  =&gt; {"confidence"=&gt;0.626936305574385, "encoding"=&gt;"ISO-8859-2"} 
  </code></pre>
  
  <p>Trying to convert the string yields the following:</p>
  
  <pre><code>Iconv.conv("UTF-8", "ISO-8859-2", "Stefan,Engstr\232m")
   =&gt; "Stefan,Engstrm"
  </code></pre>
  
  <p>whereas I would expect:</p>
  
  <pre><code> =&gt; "Stefan,Engström"
  </code></pre>
  
  <ul>
  <li>Could the string really be in some other encoding?</li>
  <li>I haven't seen the \232 syntax before, usually when strings are strangely encoded some weird character will show up instead, e.g. � or some chinese.</li>
  </ul>
  
  <p><em>Let me know if I should provide more information or elaborate on something.</em></p>