AW: [mapserver-users] WFS GetCapabilities does not work with non-ascii characters in mapfile

Eichner, Andreas - SID-NLKM Andreas.Eichner at sid.sachsen.de
Fri Feb 3 04:43:18 EST 2012


This is due to the usage of libXML2. Its internal data format is UTF-8 and MapServer has no way to deal with different map file encodings. Therefore libXML2 aborts due to invalid UTF-8 input data on serialization. Transcode your map file to UTF-8 and it should work.
Note that libXML2 is _not_ used for WMS and older WFS services. These use plain fprintf() to write data out as is. So you might encounter crazy things when trying to use different encodings on data, map file and web server output.


> -----Ursprüngliche Nachricht-----
> Von: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag 
> von Rahkonen Jukka
> Gesendet: Freitag, 3. Februar 2012 10:24
> An: 'mapserver-users at lists.osgeo.org'
> Betreff: [mapserver-users] WFS GetCapabilities does not work 
> with non-ascii characters in mapfile
> 
> Hi,
>  
> This should be simple to test and verify.
> Write into WEB METADATA parameters
>  
>  "wms_title" "test_ö"
>  "wfs_title" "test_ö"
>  
> WMS 1.1.1 GetGapabilities does not have any trouble with "ö" 
> and request sends back
> ...
> <Service>
>   <Name>OGC:WMS</Name>
>   <Title>test_ö</Title>
> ....
>  
> However, WFS GetCapabilities response gets truncated. All 
> that Mapserver sends is this
>  
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <wfs:WFS_Capabilities xmlns:gml="http://www.opengis.net/gml" 
> xmlns:wfs="http://www.opengis.net/wfs" 
> xmlns:ows="http://www.opengis.net/ows" 
> xmlns:xlink="http://www.w3.org/1999/xlink" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xmlns:ogc="http://www.opengis.net/ogc" 
> xmlns="http://www.opengis.net/wfs" version="1.1.0" 
> xsi:schemaLocation="http://www.opengis.net/wfs 
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
>   <ows:ServiceIdentification>
>     <ows:Title>test_
>  
>  
> The same error occurs if non-ascii characters are used in 
> "wfs_abstract". 
> I was testing on Windows and Mapserver 6.0.1.
>  
> -Jukka Rahkonen
> 


More information about the mapserver-users mailing list