title: Ruby: How to generate CSV files that has Excel-friendly encoding
body: <p>I am generating CSV files that needs to be opened and reviewed in Excel once they have been generated. It seems that Excel requires a different encoding than UTF-8.</p>
  
  <p>Here is my config and generation code:</p>
  
  <pre><code>csv_config = {col_sep: ";", 
                row_sep: "\n", 
                encoding: Encoding::UTF_8
               }
  
  csv_string = CSV.generate(csv_config) do |csv|
    csv &lt;&lt; ["Text a", "Text b", "Text æ", "Text ø", "Text å"]
  end
  </code></pre>
  
  <p>When opening this in Excel, the special characters are not being displayed properly:</p>
  
  <pre><code>Text a  Text b  Text Ã¦ Text Ã¸ Text Ã¥
  </code></pre>
  
  <p>Any idea how to ensure proper encoding?</p>