title: Python 3 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2
body: <p>I know there are some questions about this topic but I couldn't get the answer I'm looking for. So I'll ask it anyway. I'm beginner :)   </p>
  
  <p>I have this simple function : </p>
  
  <pre><code>f =[]
  def extract_row():
      with open('country_codes.txt') as infile:
          for line in infile:
              x = (line.split()[0])
              f.append(x)
          print (f)
  extract_row()
  </code></pre>
  
  <p>It runs on python 2.7, so I could get the information I needed.</p>
  
  <pre><code>['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AN', 'AO', 'AQ', 'AR'...
  </code></pre>
  
  <p>But when I try to run it on python 3.4 I get this error : </p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/juanlozano/Documents/geonames/extractRow.py", line 8, in &lt;module&gt;   
      extract_row()
    File "/Users/juanlozano/Documents/geonames/extractRow.py", line 4, in extract_row
      for line in infile:
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position     31: ordinal not in range(128). 
  </code></pre>
  
  <p>Does anyone could give some information about it?  </p>
  
  <p>These are some lines from the txt file I'm using :
      <a href="http://i.stack.imgur.com/Kp79I.png" rel="nofollow">enter image description here</a></p>