node-dbf icon indicating copy to clipboard operation
node-dbf copied to clipboard

Field Length Problem

Open KenOn10 opened this issue 7 years ago • 1 comments

This code is really helpful and performs well.

But, I had problems with DBF columns having lengths >128 characters, which are parsed wrong (i.e. column lengths appear as <0). IMHO, there is a bug in function convertBinaryToInteger() in header.js. The code uses buffer.readIntLE(0, buffer.length) but should use the unsigned version instead: buffer.readUIntLE(0, buffer.length).

Thanks, Ken

KenOn10 avatar Aug 07 '18 20:08 KenOn10

I comfirm that changing the header.js file to use buffer.readUIntLE(0, buffer.length) fixes the issue

Thanks

mightyjol avatar Jul 19 '19 14:07 mightyjol