title: How to encode/decode this file in Python?
body: <p>I am planning to make a little Python game that will randomly print keys (English) out of a dictionary and the user has to input the value (in German). If the value is correct, it prints 'correct' and continue. If the value is wrong, it prints 'wrong' and breaks.</p>
  
  <p>I thought this would be an easy task but I got stuck on the way. My problem is I do not know how to print the German characters. Let's say I have a file 'dictionary.txt' with this text:</p>
  
  <pre><code>cat:Katze
  dog:Hund
  exercise:Übung
  solve:lösen
  door:Tür
  cheese:Käse
  </code></pre>
  
  <p>And I have this code just to test how the output looks like:</p>
  
  <pre><code># -*- coding: UTF-8 -*-
  words = {} # empty dictionary
  with open('dictionary.txt') as my_file:
    for line in my_file.readlines():
      if len(line.strip())&gt;0: # ignoring blank lines
        elem = line.split(':') # split on ":"
        words[elem[0]] = elem[1].strip() # appending elements to dictionary
  print words
  </code></pre>
  
  <p>Obviously the result of the print is not as expected:</p>
  
  <pre><code>    {'cheese': 'K\xc3\xa4se', 'door': 'T\xc3\xbcr',
       'dog': 'Hund', 'cat': 'Katze', 'solve': 'l\xc3\xb6sen',
       'exercise': '\xc3\x9cbung'}
  </code></pre>
  
  <p>So where do I add the encoding and how do I do it?</p>
  
  <p>Thank you!</p>