Opened 10 years ago

Closed 10 years ago

#4447 closed defect (invalid)

Reading attribute with 3000 characters only reads 160

Reported by: i23098 Owned by: Even Rouault
Priority: normal Milestone: 1.9.1
Component: OGR_SF Version: 1.9.0
Severity: normal Keywords:
Cc:

Description

I'm using GDAL on Java to read a SHP file. I do

String value = currentFeature.GetFieldAsString?( index );

and I only read 160 characters. The file used is attached and opening it with Notepad seems to have all the information...

Attachments (1)

World_Countries_Mon_Jan_16_17-01-30_GMT_2012.zip (2.0 KB) - added by i23098 10 years ago.
File with one feature with 2 String attributes with more than 160 chars

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by i23098

File with one feature with 2 String attributes with more than 160 chars

comment:1 Changed 10 years ago by Even Rouault

Component: JavaBindingsOGR_SF
Resolution: invalid
Status: newclosed

I don't see any problem in GDAL. The width of the fields in the attached DBF are defined to 160 characters. I can see the same truncation happening when opening with Microsoft Excel for example. I'm not sure what software produced this DBF, but this is pretty non standard. DBF fields are limited to 254 characters.

Note: See TracTickets for help on using tickets.