WFS encoding problem

Daniel Morissette dmorissette at MAPGEARS.COM
Tue Jul 24 11:31:30 EDT 2007


Milo van der Linden wrote:
> 
> I cannot find information about the gml_encoding parameter anywhere, and 
> when I add it to my mapfile, it doesn't influence the encoding that is 
> returned.
> 
> This is a link to the mapfile that has "gml_encoding" set to "UTF-8"
> 
> http://82.176.214.209/cgi-bin/mapserv.exe?map=/ms4w/apps/mappingworlds/service/wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=worldcities&maxfeatures=3&OUTPUTFORMAT=gml2
> 

Milo,

The response of your server contains the following header:

    <?xml version='1.0' encoding="UTF-8" ?>

Which leads me to think that setting encoding has worked since the 
default encoding returned by MapServer should have been ISO-8859-1 if 
you don't explicitly set it to something else.

> Can it be that it should be "wfs_encoding"?

I think that's what the problem was. After checking the source code 
again, it seems that WFS GetFeature checks only for wfs_encoding and 
ows_encoding but doesn't try gml_encoding.

Sorry for misleading you.  :(

> Should it be placed in the web metadata section of the MAP or of the Layer?
> 

It has to be in the WEB metadata.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the mapserver-users mailing list