Mixed Encoding Attributes¶
vectorGPKGPointEPSG:4326tinybundled
A vector dataset whose attribute table contains text in multiple character encodings (UTF-8, Latin-1, Windows-1252). Exposes encoding-related failures in column parsing.
| Property | Value |
|---|---|
| Case ID | mixed_encoding_attributes |
| Category | vector |
| Format | GPKG |
| Geometry type | Point |
| CRS | EPSG:4326 |
| Location | Western Europe (synthetic) — 1.00°E, 51.00°N → 3.00°E, 53.00°N |
| Test tier | unit |
| Size class | tiny |
| Storage class | bundled |
| Redistributable | yes |
| Loader | geopandas |
| Status | validated |
Use this case¶
import pytest
@pytest.mark.geocase_case("mixed_encoding_attributes")
def test_mixed_encoding_attributes(geocase_case) -> None:
data = geocase_case.load()
assert data is not None
Use GeoCase in your tests¶
Install the complete set of vector, raster, and NetCDF dependencies:
What this case checks¶
Detect loaders that assume a single encoding or silently corrupt non-ASCII attribute values.
Risk types covered¶
Expected behavior¶
| Assertion | Expected |
|---|---|
expect_loadable |
yes |
expect_valid_geometry |
yes |
expect_crs |
yes |
expected_epsg |
4326 |
expected_geometry_types |
Point |
Notes¶
Purpose¶
Valid point geometries with multilingual text attributes to test encoding
robustness (UTF-8, Latin-1, Windows-1252 style content).
What to expect¶
- Geometry loads as
PointinEPSG:4326. - Attribute strings should preserve accents/special characters.
- Column-level parsing should not introduce mojibake.
Typical checks¶
assert_geometry_type(gdf, "Point")assert_valid_geometry(gdf)assert_epsg(gdf, 4326)- Verify representative strings remain unchanged after round-trips.
Common failure modes¶
- Silent text corruption during decode/encode.
- Attribute truncation in export/import steps.
Required capabilities¶
loadattribute-inspection
Files¶
- Primary:
mixed_attrs.gpkg - Notes:
notes.md
Source and license¶
- Source: geocase-curated
- License: MIT
Tags¶
attributes encoding i18n text vector
Related cases¶
- Shapefile Legacy DBF Encoding --
shapefile_encoding_legacy - Shapefile Field Name Truncation --
shapefile_field_truncation - Format-Limited KML Case --
format_limited_kml_case - Parquet Mixed Schema Attributes --
parquet_mixed_schema_attributes - Ambiguous Engine-dependent Polygon --
ambiguous_engine_dependent_polygon