title: dealing with multiple charset in python 3
body: <p>I'm using python 3.3.0 in Windows 8.     </p>
  
  <pre><code>requrl = urllib.request.Request(url) 
  
  response = urllib.request.urlopen(requrl)
  
  source = response.read()
  
  source = source.decode('utf-8')
  </code></pre>
  
  <p>It will work fine if the websites have <code>utf-8</code> charset but what if it has <code>iso-8859-1</code> or any other <code>charset</code>. Means I may have different website url with different charset.
  So, how to deal with multiple charset?</p>
  
  <p>Now let me tell you my efforts when I tried to resolve this issue like:</p>
  
  <pre><code>    b1 = b'charset=iso-8859-1'
      b1 = b1.decode('iso-8859-1')
  
      if b1 in source:
              source = source.decode('iso-8859-1')
  </code></pre>
  
  <p>It gave me an error like <code>TypeError: Type str doesn't support the buffer API</code>
  So, I'm assuming that it's considering b1 as string! and this is not the correct way! :(</p>
  
  <p>Please, don't say that manually change charset in the source code or have you read python docs!
  I have already tried to put my head into python 3 docs but still have no luck or I may not be picking up correct modules/contents to read!</p>