title: encoding issue with CSV.parse
body: <p>My goal is to upload a file containing rows of firstname and lastname, parse it and create Person model in db for each row.</p>
  
  <p>I do the following and it works fine</p>
  
  <pre><code>file = CSV.parse(the_file_to_parse)
  file.each do |row|
    person = Person.new(:firstname =&gt; row[0], :lastname =&gt; row[1])
    person.save
  end
  </code></pre>
  
  <p>until my file contains accents (french words), I get </p>
  
  <pre><code>Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8:
  INSERT INTO "people" ("created_at", "firstname", "lastname",
  "updated_at") VALUES (?, ?, ?, ?)
  </code></pre>
  
  <p>What is the best way to deal with this encoding issue?</p>