python psycopg2 utf8 code example
Example: python psycopg2 utf8
#Make sure you're using the right encodind by running:
print conn.encoding
#and if you need, you can set the right encoding by
conn.set_client_encoding('UNICODE')
#or
conn.set_client_encoding('UTF8').