title: python 2.7 encoding decoding
body: <p>I have a problem involving encoding/decoding.
  I read text from file and compare it with text from database (Postgres)
  Compare is done within two lists</p>
  
  <p>from file i get "jo\x9a" for "još" and from database I get "jo\xc5\xa1" for same value</p>
  
  <pre><code>common = [a for a in codes_from_file if a in kode_prfoksov]
  
  # Items in one but not the other
  only1 = [a for a in codes_from_file if not a in kode_prfoksov]
  
  #Items only in another
  only2 = [a for a in kode_prfoksov if not a in codes_from_file ]
  </code></pre>
  
  <p>How to solve this? Which encoding should be set when comparing this two strings to solve the issue?</p>
  
  <p>thank you</p>