title: Python: Read in escaped Unicode characters and turn them into readable text
body: <p>I have an RDF file where most objects consist of escaped Unicode characters as follows:</p>
  
  <pre><code>...
  &lt;http://dbpedia.org/resource/Ry%C5%8Dgoku_Kokugikan&gt; &lt;http://www.w3.org/2000/01/rdf-schema#label&gt; "\u4E21\u56FD\u56FD\u6280\u9928"@ja .
  &lt;http://dbpedia.org/resource/Tunisia&gt; &lt;http://www.w3.org/2000/01/rdf-schema#label&gt; "\u30C1\u30E5\u30CB\u30B8\u30A2"@ja .
  ...
  </code></pre>
  
  <p>I want to read in this file using a Python script and convert those objects into readable text, i.e. for the above example I would want the following output:</p>
  
  <pre><code>両国国技館
  チュニジア
  </code></pre>
  
  <p>So far, my code looks as follows:</p>
  
  <pre><code>import codecs
  
  for line in codecs.open("labels-en-uris_ja.nt","r","utf-8"):
      tmp = line.split(" ")
      label = tmp[2]
      label = label.split("@")[0]
      label = label.replace("\"","")
      print u"{0}".format(label)
  </code></pre>
  
  <p>However, this returns the escaped Unicode characters unchanged, i.e. as</p>
  
  <pre><code>\u4E21\u56FD\u56FD\u6280\u9928
  \u30C1\u30E5\u30CB\u30B8\u30A2
  </code></pre>
  
  <p>Using simply <code>print label</code> in the last line of my code gives exactly the same result. However, <code>print u"\u4E21\u56FD\u56FD\u6280\u9928"</code> gives the desired output, so I assume there is something wrong with the way I read in that file. What would be the correct way to produce the output I want?</p>