title: How to treat corrupted text as data in Python 3.x
body: <p>my code is reading lines from csv files with corrupted text - mix of ascii and oct. And I'm trying to recover an original text in UTF-8 but I'm missing something obvious.</p>
  
  <pre><code>line = "Tom\303\241\305\241 Vala" #Tomáš Vala
  print(a)
  TomÃ¡Å¡ Vala  #incorrect
  </code></pre>
  
  <p>If I type the line manually in command line the result is correct:</p>
  
  <pre><code>&gt;&gt;&gt; a = b"Tom\303\241\305\241 Vala" 
  &gt;&gt;&gt; a = a.decode("utf-8")
  'Tomáš Vala'  # correct
  </code></pre>
  
  <p>But how to print the line as it is already in bytes?</p>
  
  <pre><code>&gt;&gt;&gt; a = "Tom\303\241\305\241 Vala" 
  &gt;&gt;&gt; print(a)
  TomÃ¡Å¡ Vala  #incorrect
  
  &gt;&gt;&gt; b = bytes(a, 'utf=8')
  &gt;&gt;&gt; b.decode('utf=8')
  'TomÃ¡Å¡ Vala' #incorrect
  </code></pre>