Opened 13 years ago

Closed 13 years ago

#3974 closed enhancement (fixed)

Case insensitive ERS parsing

Reported by: rprinceley Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: ERS
Cc: gaopeng

Description

We have a few user submitted ERS files that are all lowercase (except quoted strings). GDAL fails parsing such files, but these are supported by ERDAS applications (and older versions of ArcGIS).

Attachments (1)

header.ers (786 bytes ) - added by rprinceley 13 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by warmerdam, 13 years ago

Keywords: ERS added
Status: newassigned

I don't immediately see obvious case sensitivity issues in the gdal/frmts/ers. Could you attach a header that demonstrates the problem?

by rprinceley, 13 years ago

Attachment: header.ers added

comment:2 by rprinceley, 13 years ago

Frank,

The problem is in ERSHdrNode::ParseChildren. CPLString (based on std::string) is case sensitive, CPLString::find() ends up calling memcmp() to compare strings.

comment:3 by warmerdam, 13 years ago

Milestone: 1.8.1
Resolution: fixed
Status: assignedclosed

I have corrected the problem in trunk (r21813,r21814), 1.8 (r21815) and 1.8-esri (r21817).

Testing added in trunk (r21818).

Note: See TracTickets for help on using tickets.