Skip to content

DbfReader header size check fails on some dbf files #65

@pvlcursus

Description

@pvlcursus

DbfReader currently does a check on the header length read from bytes 8-9 in the dbf header. This length should exactly match the header descriptor size + the field descriptor size * number of fields + 1 (for the terminator mark). If the check fails DbfReader throws an exception "Invalid dBASE III file format."

However, I have a number of probably valid dbf files where the terminator mark 0Dh is followed by an extra byte 00h. This extra byte is part of the header and calculated in the header size reported in bytes 8-9. DbfReader throws an exception on these files, but I'm not convinced they violate the dBASE III file format. The same files are correctly processed by NetTopologySuite.IO.DbaseFileHeader and major ESRI geoprocessing software.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions