Skip to content

Commit

Permalink
iconv feature attributes before applying filtering (#5215)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Jan 5, 2016
1 parent f8ec673 commit 100e6af
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions maplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,14 @@ int msLayerNextShape(layerObj *layer, shapeObj *shape)
if(rv != MS_SUCCESS) return rv;

filter_passed = MS_TRUE; /* By default accept ANY shape */

/* attributes need to be iconv'd to UTF-8 before any filter logic is applied */
if(layer->encoding) {
rv = msLayerEncodeShapeAttributes(layer,shape);
if(rv != MS_SUCCESS)
return rv;
}

// if(layer->numitems > 0 && layer->iteminfo) {
filter_passed = msEvalExpression(layer, shape, &(layer->filter), layer->filteritemindex);
// }
Expand All @@ -344,11 +352,6 @@ int msLayerNextShape(layerObj *layer, shapeObj *shape)
return rv;
}

if(layer->encoding) {
rv = msLayerEncodeShapeAttributes(layer,shape);
if(rv != MS_SUCCESS)
return rv;
}

return rv;
}
Expand Down

0 comments on commit 100e6af

Please sign in to comment.