Skip to content

Commit

Permalink
Force utf-8 encoding when reading CSV files (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Jan 2, 2025
1 parent f3322ad commit 3fe42d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyinaturalist_convert/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def load_table(
if progress:
progress.start_job(csv_path)

with sqlite3.connect(db_path) as conn, open(csv_path) as f:
with sqlite3.connect(db_path) as conn, open(csv_path, encoding='utf-8') as f:
conn.execute('PRAGMA synchronous = 0')
conn.execute('PRAGMA journal_mode = WAL')
_create_table(conn, table_name, non_pk_cols, pk)
Expand Down

0 comments on commit 3fe42d2

Please sign in to comment.