Skip to content

Commit 01be04e

Browse files
committed
ensure utf8 before saving to db
1 parent 2faca60 commit 01be04e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/transport/lib/irve/database_importer.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ defmodule Transport.IRVE.DatabaseImporter do
3333
end
3434

3535
def write_to_db(file_path, dataset_datagouv_id, resource_datagouv_id) do
36-
content = File.read!(file_path)
36+
content =
37+
File.read!(file_path)
38+
|> Transport.IRVE.RawStaticConsolidation.ensure_utf8()
3739

3840
rows_stream =
3941
content |> Transport.IRVE.Processing.read_as_data_frame() |> Explorer.DataFrame.to_rows_stream()

0 commit comments

Comments
 (0)