Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dbf3 file format support #12

Open
claudiodriussi opened this issue May 24, 2020 · 0 comments
Open

Dbf3 file format support #12

claudiodriussi opened this issue May 24, 2020 · 0 comments

Comments

@claudiodriussi
Copy link

claudiodriussi commented May 24, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant