simpledbf icon indicating copy to clipboard operation
simpledbf copied to clipboard

Dbf3 file format support

Open claudiodriussi opened this issue 4 years ago • 0 comments

I have a lot of DBF files in Dbf3 format. If I try to read with Dbf5 class, the records are shifted by 1 byte and the reading of records fails, so I wrote a derived class:

class Dbf3(Dbf5):
    def __init__(self, dbf, codec='utf-8'):
        super().__init__(dbf, codec)
        self.f.read(1)

then I modified the _get_recs(self, chunk=None) method to recognize the "M" memo types simply to avoid exception:

# memo fields not supported
elif typ == 'M':
    value = self._na

claudiodriussi avatar May 24 '20 10:05 claudiodriussi