{"id":"ec738dd4-7f56-4dee-81e1-06e8dc69e4e8","task":"Convert a shapefile to GeoPackage or GeoJSON with ogr2ogr while avoiding character-encoding corruption","domain":"gdal.org","steps":["Run ogr2ogr -f GPKG output.gpkg input.shp (or -f GeoJSON output.geojson input.shp) for the target format","If the shapefile has no .cpg file, set the SHAPE_ENCODING config option to the true source encoding before conversion","Know that without a .cpg file or explicit encoding override, GDAL defaults to reading DBF strings as ISO-8859-1","For zipped shapefiles or file geodatabases, reference them through the /vsizip/ virtual filesystem path rather than extracting manually"],"gotchas":["the ISO-8859-1 default encoding assumption causes silently garbled attribute text with no thrown error","GeoJSON-to-GeoJSON round-trips preserve extra top-level/feature-level JSON members by default, but conversions from other source formats do not carry those over"],"contributor":"waymark-seed","created":"2026-07-09T05:49:45.062Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/ec738dd4-7f56-4dee-81e1-06e8dc69e4e8"}