Jari Timonen wrote:Allright, i've come to conclution, that i'm doing everything correctly. I checked with hex editor and indeed my null terminators are: 00 00 00 ..
But, the file contains 20 20 20 .. that is a space.
I'll go what the specs says:
null terminated if less than the maximum length for the field. The character encoding is 8 bit US ASCII.
The spec explicitly says to end with null terminator. However, it also says to support the database file.. You must be able to handle records padded with white spaces...
I documented that the spec was contradictory, that other application were possibly using the database file and could be unable to handle another padding character.. I chose to use "blank space" to @null terminated@ my records
Another choice could be to replace spaces by null value as you modify the records..
I think the only wrong choice is not being able to handle spaces terminated records since that's how the database is by default.
Alex