Closed kristofdegrave closed 1 month ago
When we write a string value that starts or ends with a space in a dbase file, these spaces are removed when reading the value.
https://github.com/NetTopologySuite/NetTopologySuite.IO.ShapeFile/blob/3c952d5df92d1b5cc3c78b7f9d4815f129c2b719/src/NetTopologySuite.IO.ShapeFile/Dbase/DbaseFileReader.cs#L163
Are there any specific reasons why this is done? I would expect to get the result back, the way I wrote it in the file.
According to the dBASE specification Character (C) field is "padded with blanks to the width of the field". Therefore all spaces have to be trimmed, as per specification.
When we write a string value that starts or ends with a space in a dbase file, these spaces are removed when reading the value.
https://github.com/NetTopologySuite/NetTopologySuite.IO.ShapeFile/blob/3c952d5df92d1b5cc3c78b7f9d4815f129c2b719/src/NetTopologySuite.IO.ShapeFile/Dbase/DbaseFileReader.cs#L163
Are there any specific reasons why this is done? I would expect to get the result back, the way I wrote it in the file.