Skip to content

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.

Point geometry of mixed_encoding_attributes, rendered from the case's data
Point geometry, rendered from the case's actual geometry. Scale is normalized to the viewport and is not comparable between cases.
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:

pip install "geocase[all]"

View GeoCase on PyPI.

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 Point in EPSG: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

  • load
  • attribute-inspection

Files

Browse this case on GitHub

Source and license

  • Source: geocase-curated
  • License: MIT

Tags

attributes encoding i18n text vector