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

@deleted condition is incomplete #23

Closed
CutOffFrequency opened this issue Sep 30, 2016 · 3 comments
Closed

@deleted condition is incomplete #23

CutOffFrequency opened this issue Sep 30, 2016 · 3 comments

Comments

@CutOffFrequency
Copy link
Contributor

CutOffFrequency commented Sep 30, 2016

I noticed that the '@deleted' property in the record objects was not always accurate (possibly related to
this issue)

I found in the .DBF specification (and confirmed) that the deleted flag could have one of four different values: 20h, 2Ah, '*', and " " (blank).

The assignment for record['@deleted'] in lib/parser.js was only accounting for one. I fixed this by (locally) changing the assignment to:

'@deleted': ( (buffer.slice(0, 1))[0] === 42 || (buffer.slice(0, 1))[0] === '*' ) ? true : false,

I hope this helps

@forrestmid
Copy link

I can verify this is an issue with the current version. Replacing the line on the parser.js file fixed the data I was trying to import from a DBF file using a star (*) as the deleted flag.

@abstractvector
Copy link
Owner

Can you issue a pull request with a sample file so I can fix this and create the test for it please?

@abstractvector
Copy link
Owner

Closing this per the discussion in #31

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

3 participants