Invalid DBF: Incorrect record length problem
seonglae opened this issue · 4 comments
Invalid DBF: Incorrect record length
Can I know what this error message mean?
I guess difference between length attributes and record length or another.
But I couldn't figure out, so can I get answer?
It means that the sum of all the field sizes doesn't match the record length recorded in the file header. So the file is not technically valid I would think, but it's possible that some programs create dbf files with incorrect record lengths and just ignore the error. Or it might be a file version that isn't supported by this library that does things differently. I couldn't say anything more specific without more info.
Can I ignore this error? and just get records
Sorry @seonglae I lost track of this. There's currently no way to just ignore this error and read the records. The record length is used to calculate the offset where each record starts/ends. If it's incorrect, you may just read garbage.
Having said that, I could imagine ignoring this error in 'loose' read mode and just allowing to read records regardless. I'm unlikely to get to this soon, so a PR would be welcome.
Incorrect record length is now tolerated in 'loose' read mode, as of v1.6.0.