title: Encoding error using csv.reader on io file object with non-ascii encoding
body: <p>I am trying to read a csv file with cp1252 encoding like this:</p>
  
  <pre><code>import io
  import csv
  
  csvr = csv.reader(io.open('data.csv', encoding='cp1252'))
  
  for row in csvr:
      print row
  </code></pre>
  
  <p>The relevant content of 'data.csv' is</p>
  
  <pre><code>Curva IV
  Fecha: 27-Jul-2016 16:22:40
  Muestra: 1
  Tensión      Corriente      Ig
  0.000000e+000   1.154330e-004   -2.984730e-004
  ...
  </code></pre>
  
  <p>and I get the following output</p>
  
  <pre><code>['Curva IV']
  ['Fecha: 27-Jul-2016 16:22:40']
  ['Muestra: 1']
  Traceback (most recent call last):
    File "D:/sandbox/bla.py", line 347, in &lt;module&gt;
      mist()
    File "D:/sandbox/bla.py", line 343, in mist
      for row in csvr:
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 5: ordinal not in range(128)
  </code></pre>
  
  <p>which I do not understand at all. Obviously the critical line is that with the accent on the 'o'. It seems like the iterator of the object returned by csv.reader is attempting to do a conversion. The exception is raised before the print statement, so it is not a problem with my terminal encoding. Any ideas what is going on here?</p>