title: Python zlib output, how to recover out of mysql utf-8 table?
body: <p>In python, I compressed a string using zlib, and then inserted it into a mysql column that is of type blob, using the utf-8 encoding. The string comes back as utf-8, but it's not clear how to get it back into a format where I can decompress it. Here is some pseduo-output:</p>
  
  <p>valueInserted = zlib.compress('a')
  = 'x\x9cK\x04\x00\x00b\x00b'</p>
  
  <p>valueFromSqlColumn
  = u'x\x9cK\x04\x00\x00b\x00b'</p>
  
  <p>zlib.decompress(valueFromSqlColumn)
  UnicodeEncodeError: 'ascii' codec can't encode character u'\x9c' in position 1: ordinal not in range(128)</p>
  
  <p>if i do this, it inserts some extra characters:</p>
  
  <p>valueFromSqlColumn.encode('utf-8')
  = 'x\xc2\x9cK\x04\x00\x00b\x00b'</p>
  
  <p>Any suggestions?</p>