title: Converting ISO-8859-1 to utf-8 (øæå)
body: <p>I have a txt document containing letters ('øæå') and i want this script to recognize this letters and properly write them to the csv-file.</p>
  
  <pre><code>with codecs.open('transaksjonliste.txt', 'r', 'ISO-8859-1') as file:
      for line in file:
  
          line = file.readline() 
          lineS = line.encode('ISO-8859-1', 'ignore').decode('utf-8')
          splitTab = lineS.split(';')
  
          for s in splitTab:
              newS = s[1:-1]
  
          date = splitTab[0].replace('.', '/')
          insertList = [date,]
          out.writerow(date)
  </code></pre>
  
  <p>Gives:</p>
  
  <pre><code>  File "Q:\DropBox\Development\Scripts\tes2.py", line 17, in &lt;module&gt;
      lineS = line.encode('ISO-8859-1', 'ignore').decode('utf-8')
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 14: invalid start byte
  </code></pre>