Merge pull request #5798 from wy65701436/fix-5788

Add the encoding to the data converter script
This commit is contained in:
Daniel Jiang 2018-09-04 13:16:55 +08:00 committed by GitHub
commit 2f573beb91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ def write_table(pgsql_dump, table_lines):
def write_insert(pgsql_dump, insert_lines):
for item in insert_lines:
pgsql_dump.write("%s\n" % item)
pgsql_dump.write("%s\n" % item.encode('utf-8'))
def write_foreign_key(pgsql_dump):
pgsql_dump.write('\n')