Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion importer/handlers/shapefile/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def create_ogr2ogr_command(files, original_name, ovverwrite_layer, alternate):
):
additional_options.append("-nlt PROMOTE_TO_MULTI")
if encoding:
additional_options.append(f"-lco ENCODING={encoding}")
additional_options.append(f"--config SHAPE_ENCODING {encoding}")

return (
f"{base_command } -lco precision=no -lco GEOMETRY_NAME={BaseVectorFileHandler().default_geometry_column_name} "
Expand Down
2 changes: 1 addition & 1 deletion importer/handlers/shapefile/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_should_create_ogr2ogr_command_with_encoding_from_cst(self):
actual = self.handler.create_ogr2ogr_command(shp_with_cst, "a", False, "a")

_file.assert_called_once_with(cst_file, "r")
self.assertIn("ENCODING=UTF-8", actual)
self.assertIn("--config SHAPE_ENCODING UTF-8", actual)

@patch("importer.handlers.common.vector.Popen")
def test_import_with_ogr2ogr_without_errors_should_call_the_right_command(
Expand Down