Hello.
I've spotted a problem, while reading data from columns.
There I have a dbf.
You can see that "GDE" field has length of 5 and for the first record it contains " 1" (e.g. four spaces and "1"). when I'm using reader.GetValue or GetDecimal, it returns 0 to me. For the value " 11" it returns 1.
So I've started to suspect that it cuts the last byte and tried with another field.
I've tried to read from "REK1" field (yeap, its data looks clumsy), and it returned to me that value but with extra "1" before, so it looks that there's a problem with offset.
ADDED!
I've found the reason. That's the damn dBase 7 Extra properties (http://www.dbase.com/KnowledgeBase/int/db7_file_fmt.htm). As I understood, they are optional, but the file of that format contains extra zero byte, if it doesn't contain that properties.
There we have terminating byte (red), dBase7 extra properties section (yellow, and it is empty, but the byte is present), then deletion marker (space or asterisk, green), and finally the value of first field (" 1", blue).
Please notice, that according to http://www.dbf2002.com/dbf-file-format.html, the 8th and 9th bytes contain offset of data, so we can just seek to that place, ignoring the extra properties.
data starts at 0x0422 = 1058 bytes, while currently NDbfReader will start from 1057
ADDED
I've changed a bit Load method in HeaderLoader:
....
BasicProperties properties = ParseBasicProperties(buffer);
var retVal = LoadColumns(stream, properties, buffer.Last());
var dataOffset = (buffer[DATA_START_OFFSET_H] << 8) | buffer[DATA_START_OFFSET_L];
stream.Seek(dataOffset, SeekOrigin.Begin);
return retVal;
....
DATA_START_OFFSET_H = 8;
DATA_START_OFFSET_L = 9;
p.s.
I'm new to github, I also want to fork this projects. I've added GetBytes method (in addition to GetValue), so now I can get raw bytes for any field I want (I'm just had a problem with decoding of crypted string in a string-typed field, so I did need a raw data to make some operations, without any encoding issues)..