From e810351abcbc523fb3a0896de66e39607f519768 Mon Sep 17 00:00:00 2001 From: Saidy Barry Date: Thu, 3 Sep 2026 12:57:57 +0200 Subject: [PATCH 1/2] removed redundant encoding patches. --- fiboa_cli/datasets/de_bw.py | 4 ---- fiboa_cli/datasets/de_he.py | 1 - fiboa_cli/datasets/es_cat.py | 2 ++ 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/fiboa_cli/datasets/de_bw.py b/fiboa_cli/datasets/de_bw.py index 8b1b3233..03e283e4 100644 --- a/fiboa_cli/datasets/de_bw.py +++ b/fiboa_cli/datasets/de_bw.py @@ -43,10 +43,6 @@ class DEBWConverter(AdminConverterMixin, DEIACSMixin, FiboaBaseConverter): page_size = 50_000 - # read_geojson calls open() without an encoding, so it follows the platform locale: - # UTF-8 on Linux/macOS, cp1252 on Windows, which would turn "Grünland" into mojibake. - open_options = dict(encoding="utf-8") - columns = { "geometry": "geometry", "Geo-ID": "id", diff --git a/fiboa_cli/datasets/de_he.py b/fiboa_cli/datasets/de_he.py index b0f0c0b2..0185b74a 100644 --- a/fiboa_cli/datasets/de_he.py +++ b/fiboa_cli/datasets/de_he.py @@ -40,7 +40,6 @@ class DEHEConverter(AdminConverterMixin, DEIACSMixin, FiboaBaseConverter): "declaredArea": "metrics:area", # in hectares, hence the area_is_in_ha default "validFrom": "determination:datetime", } - open_options = dict(encoding="utf-8") column_migrations = { "validFrom": lambda col: pd.to_datetime(col, format="%d.%m.%Y"), } diff --git a/fiboa_cli/datasets/es_cat.py b/fiboa_cli/datasets/es_cat.py index 1987bcfe..c0996e30 100644 --- a/fiboa_cli/datasets/es_cat.py +++ b/fiboa_cli/datasets/es_cat.py @@ -54,6 +54,8 @@ class ESCatConverter(FiboaBaseConverter): "crop:code": "crop:code", "crop:name_en": "crop:name_en", } + # Tells GDAL how the shapefile variants are encoded, since a shapefile does not have to say. + # Unrelated to the GeoJSON encoding that vecorel-cli handles, so it is still needed here. open_options = dict(encoding="utf-8") column_migrations = { "campanya": lambda col: pd.to_datetime(col, format="%Y"), From 16b3d694cfeaa95105037bbee1c24689d3bbb385 Mon Sep 17 00:00:00 2001 From: Saidy Barry Date: Thu, 3 Sep 2026 13:18:59 +0200 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4820ef1..f6735a1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Update vecorel-cli to v0.2.17: - GeoJSON is read as UTF-8 as the format mandates, instead of the platform locale (cp1252 on Windows mangled umlauts) - GeoJSON files with a byte order mark no longer fail to read + - Drop the per-converter UTF-8 workarounds in de_bw and de_he, now redundant - Converter for Spain (whole), based on the FEGA 2025+ data - Add Italy Tuscany (IT-1) basd on EuroCrops v2 - Suuport multiple years for CZ