From c477b4365b0c4912bed28af0e109256df82a427b Mon Sep 17 00:00:00 2001 From: Daniel Muschick Date: Thu, 12 Oct 2023 00:11:41 +0200 Subject: [PATCH] Fixes problem with DBF file where rest of field name is not filled with \0 --- src/DBFTables.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DBFTables.jl b/src/DBFTables.jl index 442dec4..53eda3c 100644 --- a/src/DBFTables.jl +++ b/src/DBFTables.jl @@ -193,7 +193,7 @@ end "Read a field descriptor from the stream, and create a FieldDescriptor struct" function read_dbf_field(io::IO) field_name_raw = String(read!(io, Vector{UInt8}(undef, 11))) - field_name = Symbol(strip(replace(field_name_raw, '\0' => ' '))) + field_name = Symbol(split(field_name_raw, '\0')[1]) field_type = read(io, Char) skip(io, 4) # skip field_len = read(io, UInt8)