title: unicode error with codecs when reading a pdf file in python
body: <p>I am trying to read a pdf file with the following contain:</p>
  
  <pre><code>%PDF-1.4\n%âãÏÓ
  </code></pre>
  
  <p>If I read it with open, it works but if I try with codecs.open(filename, encoding="utf8", mode="rb") to get a unicode string, I got the following exception:</p>
  
  <pre><code>UnicodeDecodeError: 'utf8' codec can't decode byte 0xe2 in position 10: invalid continuation byte
  </code></pre>
  
  <p>Do you know a way to get a unicode string from the content of this file?</p>
  
  <p>PS: I am using python 2.7</p>