[gdal-dev] Question on WFS and encoding

Even Rouault even.rouault at spatialys.com
Thu Jun 18 07:16:36 PDT 2015


Le jeudi 18 juin 2015 15:50:22, Andreas Neumann a écrit :
> Hi,
> 
> I want to transform a WFS to Postgis, using this WFS service:
> 
> http://wms.zh.ch/NEKWMS with the layer
> "landwirtschaftliche-nutzungseignung"
> 
> While this works fine, there seems to be an issue with encoding. German
> Umlauts are not correctly displayed after the transformation.
> Is there a
> way to specify the encoding in ogr2ogr or with some options for WFS?
> 
> http://www.gdal.org/drv_wfs.html does not list an encoding option.
> 
> Or is it a misconfiguration of the server, if the Umlauts do not display
> correctly?

Andreas,

I think this is an issue with the server that declares <?xml version='1.0' 
encoding="ISO-8859-1" ?> in the header of its GetFeature response, but the 
content really is in UTF-8.

As it seems to be a MapServer service, I guess the following is missing in the 
WEB metadata section of the mapfile (for MapServer < 7), since the default is 
ISO-8859-1 :
"wfs_encoding" "UTF-8"

No easy workaround on OGR side since the OGR GML driver will honour the XML 
encoding indication to do recoding (from what it assumes to be ISO-8859-1, but 
is UTF-8) to UTF-8...

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150618/2f4dde17/attachment.html>


More information about the gdal-dev mailing list