title: CSV writing Ruby Encoding Error
body: <p>I am trying to write a UTF-8 character in a CSV file with csv library of Ruby. And I have got an error:</p>
  
  <blockquote>
    <p>csv ruby write problem ASCII-8BIT (Encoding::CompatibilityError)</p>
  </blockquote>
  
  <pre><code>#create csv file
  CSV.open(CSV_file,"wb",) do |csv|
    csv &lt;&lt; First_line
    rows.each do  |r|
      csv &lt;&lt; r.generate_array
    end
  end
  </code></pre>
  
  <p>That's the code where UTF-8 conflicts with ASCII-8BIT.</p>
  
  <p>Example text that fails: </p>
  
  <blockquote>
    <p>demás</p>
  </blockquote>