title: Python string to unicode
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/267436/how-do-i-treat-an-ascii-string-as-unicode-and-unescape-the-escaped-characters-in">How do I treat an ASCII string as unicode and unescape the escaped characters in it in python?</a><br>
    <a href="https://stackoverflow.com/questions/990169/how-do-convert-unicode-escape-sequences-to-unicode-characters-in-a-python-string">How do convert unicode escape sequences to unicode characters in a python string</a>  </p>
  </blockquote>
  
  
  
  <p>I have a string that contains unicode characters e.g. <code>\u2026</code> etc. Somehow it is not received to me as <code>unicode</code>, but is received as a <code>str</code>. How do I convert it back to unicode?</p>
  
  <pre><code>&gt;&gt;&gt; a="Hello\u2026"
  &gt;&gt;&gt; b=u"Hello\u2026"
  &gt;&gt;&gt; print a
  Hello\u2026
  &gt;&gt;&gt; print b
  Hello…
  &gt;&gt;&gt; print unicode(a)
  Hello\u2026
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>So clearly <code>unicode(a)</code> is not the answer. Then what is?</p>