psycopg2 does not insert unicode data
问题 I have a script that takes data from one database and according to tables' names and fields copies it into another database. The issue is about unicode data, I need to insert some words in Russian but every time psycopg2 writes it as if it were default string. import psycopg2 import psycopg2.extensions conn_two = psycopg2.connect(user="postgres", password="password", host = "localhost", port= "5432", dbname = "base2") cur_2 = conn_two.cursor() sql = 'INSERT INTO {} ({}) VALUES {};'.format('