title: Write ® to csv with csv.writer
body: <p>I'm trying to write strings with '®' to a csv file:</p>
  
  <pre><code>csvfile  = open(destination, "wb")
  csv_writer = csv.writer(csvfile, quoting=csv.QUOTE_MINIMAL, delimiter='\t')
  for row in data:
      csv_writer.writerow(row)
  
  csvfile.close()
  </code></pre>
  
  <p>and row looks like this:</p>
  
  <pre><code>[123, "str", "str2 ®"]
  </code></pre>
  
  <p>The strings I'm trying to write to csv is retrieved from xml, which I believe is encoded to utf-8.</p>
  
  <p>I get error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "/home/ec2-user/django/app/models.py", line 94, in import_data
      load_to_csv(out, out_data)
    File "/home/ec2-user/django/utils/util.py", line 90, in load_to_csv
      csv_writer.writerow(row)
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xae' in position 66: ordinal not in range(128)
  </code></pre>
  
  <p>Then I tried to encode the string to utf-8:</p>
  
  <pre><code>csvfile  = open(destination, "wb")
  csv_writer = csv.writer(csvfile, quoting=csv.QUOTE_MINIMAL, delimiter='\t')
  for row in data:
      for i, r in enumerate(row):
          if type(r) is str:
              row[i] = r.encode('utf-8')
      csv_writer.writerow(row)
  
  csvfile.close()
  </code></pre>
  
  <p>But I still get the same error.. Could anyone help? Have been stuck for a while..</p>