Add PQsetClientEncoding(conn, "SQL_ASCII") to the pgsql module.