Shapefile DBF — Accented Attributes in CP1252
The same four accented attribute rows written in CP1252. Both files are exactly the same size because DBF fields are fixed-width in bytes, not characters — so the UTF-8 table fits fewer characters per field, and a reader that guesses the encoding produces mojibake rather than an obvious failure.
| CODE | NAME | NOTE |
|---|---|---|
| KB | Kestrel Bay | Café by the ferry ramp |
| MR | Marram | Dune path, naïve grading |
| HW | Holloway | Ångström Lane junction |
| NP | Ninepin | Señal de peligro at the ford |
Specifications
- Format
- dBase III attribute table
- Crs
- WGS 84 (EPSG:4326)
- Byte Order
- mixed — big-endian headers, little-endian records
- Sidecar Set
- .shp/.shx/.dbf/.prj/.cpg
- Records
- 4
- Fields
- 3
- Encoding
- cp1252
- Language Driver Id
- 0x03
- Declared By
- attributes-cp1252.cpg
- Note
- single-byte cp1252 with language driver 0x03 set, which contradicts the ISO-8859-1 .cpg
Testing contract
Expected to pass- Scenario
- Read the table honouring the CP1252 declaration, then read it again assuming the other encoding.
- Expected result
- The correct encoding returns Café, naïve, Ångström and Señal intact; the wrong one produces replacement characters or splits a multi-byte sequence across the field boundary.
What is a .dbf file?
A dBASE table (.dbf) is a legacy binary tabular format with a fixed-width header describing columns (name, type, length) followed by fixed-length records. It persists today as the attribute table of GIS shapefiles and in legacy database exchange.
How to use this file
Use an example .dbf file to test dBASE/xBase readers, shapefile attribute parsing, and DBF-to-CSV conversion.
How to use this file for testing
“Shapefile DBF — Accented Attributes in CP1252” is a deterministic Novus Examples fixture for Geospatial, Encoding detection, Data import. GeoJSON, GPX, and KML files with points, lines, polygons, and tracks — for testing map tools, route parsers, and geo importers.
Documented properties for this file: 4 records · 3 fields · cp1252. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Geospatial fixtures publish one invented territory across formats, with the coordinate reference system and feature counts documented in specs. Convert or reproject and diff against the twin in the same group; edge-case geometries state exactly which assumption they are built to break.
Related files
- cpgShapefile — Code Page Sidecar (.cpg, UTF-8)A one-line sidecar naming the encoding of the .dbf. Without it a reader has to guess — usually cp1252 — and every non-ASCII attribute value comes back as mojibake, which is the single most common shapefile data-loss bug.

- dbfShapefile — Parcels Attributes (.dbf)The parcel attribute table, joined to the .shp purely by record order — there is no key and no explicit link. Deleting a geometry without deleting its row shifts every subsequent attribute onto the wrong shape, silently.

- dbfShapefile — Roads Attributes (.dbf with a decimal field)The road attribute table, including a numeric field declared with two decimal places. DBF stores numbers as right-justified ASCII, so the declared width and decimal count are the only thing that says 9.40 is not 940.

- dbfShapefile — Towns Attributes (.dbf, dBase III)The attribute table as a dBase III file: fixed-width, space-padded, ASCII numerics. Field names are capped at ten characters and there is no type for dates-with-time or for nested values, which is why shapefile export loses so much of a modern schema.

- zipShapefile Bundle — Kestrel Bay Parcels (zipped component set)A zipped shapefile containing a three-file polygon set with no .cpg, so the DBF encoding is undeclared. Zipping is how shapefiles are actually exchanged, because a bare .shp is meaningless without its sidecars — and it is the upload format most web GIS tools accept.

- zipShapefile Bundle — Kestrel Bay Towns (zipped component set)A zipped shapefile containing the full five-file point set — .shp, .shx, .dbf, .prj and .cpg. Zipping is how shapefiles are actually exchanged, because a bare .shp is meaningless without its sidecars — and it is the upload format most web GIS tools accept.

Generated by generation/geospatial.py. Free for any use, no attribution required — license.