Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

How to get the mapserver WFS OGR driver to encode unicode in geojson

$
0
0

Running mapserver 6.4.1, gdal 1.14.3 I try to output some WFS features using outputformat=geojson. The relevant bits of the mapfile are appended below.

Everything works fine, but unicode characters are still encoded as ISO-8859-1 when using geojson. The OGR/GML driver outputs utf-8 correctly. OGR/CSV also fails and uses ISO-8859-1.

I get for example "gatenavn": "Langørhøgden" with outputformat=geojson and <ms:gatenavn>Langørhøgden</ms:gatenavn> in GML

Is there any dataset or layer creation option or mapfile parameter I am missing?

 (in WEB/METADATA)
 "wfs_getfeature_formatlist" "geojson,csv,ogrgml"
 "wfs_encoding" "UTF-8"


 OUTPUTFORMAT
  NAME "geojson"
  DRIVER "OGR/GEOJSON"
  MIMETYPE "application/json; subtype=geojson"
  FORMATOPTION "STORAGE=stream"
  FORMATOPTION "FORM=SIMPLE"
  FORMATOPTION "LCO:COORDINATE_PRECISION=5"
 END

Viewing all articles
Browse latest Browse all 397

Trending Articles