Skip to content

Commit

Permalink
Fix build without iconv (#5195)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Nov 10, 2015
1 parent 463d31f commit e47e642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mapstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,6 @@ int msLayerEncodeShapeAttributes( layerObj *layer, shapeObj *shape) {
char *outp, *out = NULL;
size_t len, bufsize, bufleft, iconv_status;
int i;
#endif

if( !layer->encoding || !*layer->encoding || !strcasecmp(layer->encoding, "UTF-8"))
return MS_SUCCESS;
Expand All @@ -2210,7 +2209,6 @@ int msLayerEncodeShapeAttributes( layerObj *layer, shapeObj *shape) {
return MS_FAILURE;
}

#ifdef USE_ICONV
for(i=0;i <shape->numvalues; i++) {
if(!shape->values[i] || (len = strlen(shape->values[i]))==0) {
continue; /* Nothing to do */
Expand Down Expand Up @@ -2241,6 +2239,8 @@ int msLayerEncodeShapeAttributes( layerObj *layer, shapeObj *shape) {

return MS_SUCCESS;
#else
if( !layer->encoding || !*layer->encoding || !strcasecmp(layer->encoding, "UTF-8"))
return MS_SUCCESS;
msSetError(MS_MISCERR, "Not implemented since Iconv is not enabled.", "msGetEncodedString()");
return MS_FAILURE;
#endif
Expand Down

0 comments on commit e47e642

Please sign in to comment.