albfernandez / javadbf

Java library for reading and writing Xbase (dBase/DBF) files.
GNU Lesser General Public License v3.0
224 stars 98 forks source link

Read character field with length >33 #60

Closed olnow closed 5 years ago

olnow commented 5 years ago

Hello!

I have a problem with read some dbf file. File reads, but character field with length 100 reads only 33 character. DBF Viewer defines file format: FoxBase+/dBase 3 PLUSE, no memo. Field length - 100 character.

Please tell me how to solve this issue. Thanks 111.zip

albfernandez commented 5 years ago

I think javadbf is triming your string. you can change this behaviour

    reader = new DBFReader(new FileInputStream(testFile));
    reader.setTrimRightSpaces(false);
olnow commented 5 years ago

Thank you for answer.

The problem was be in trim, but not in javadbf. It was in my trim function. Moreover trim string from the middle of the word.

Thanks.