title: How to convert \xXY encoded characters to UTF-8 in Python?
body: <p>I have a text which contains characters such as "\xaf", "\xbe", which, as I understand it from <a href="https://stackoverflow.com/questions/889941/which-encoding-uses-the-x-backslash-x-prefix">this question</a>, are ASCII encoded characters. </p>
  
  <p>I want to convert them in Python to their UTF-8 equivalents. The usual <code>string.encode("utf-8")</code> throws <code>UnicodeDecodeError</code>. Is there some better way, e.g., with the <code>codecs</code> standard library?</p>
  
  <p>Sample <a href="http://dl.dropbox.com/u/893551/encoding-sample" rel="nofollow noreferrer">200 characters here</a>.</p>