[mapserver-users] mapserver, qgis, legend and encoding

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Aug 1 06:56:29 PDT 2016


Hello Leehan,

Be strongly warned that there is a known issue with QGIS that I keep 
hitting, when I'm modifying a WMS service and testing it in QGIS - the 
capabilities responses are cached by QGIS, and must be manually cleared. 
  You can read the whole thread here (this is my latest message: 
http://lists.osgeo.org/pipermail/qgis-developer/2016-August/044000.html). 
  There is also an associated QGIS ticket, but there has been no action 
on it, so, be strongly aware of that problem as you travel down this path.

I've tested a simple mapfile with legend text such as "Côte d'Or" and 
"fossé" with no problems (successfully displayed legend in QGIS 2.16.0 
for that WMS service).  Here is some advice from me:

- test with a simple mapfile (make a copy of your mapfile, and in that 
new copy remove all layers except your one "Communes" layer, and remove 
all classes except one class ("Côte d'Or")
- test that simple mapefile (verify GetCapabilities request manually, 
remove all WARNING messages, and then test that simple mapfile in QGIS
- once you have that working, go back to your problem (big) mapfile
- note that I am using MapServer 7.0.1 (MS4W 3.1.4) so the ENCODING 
parameter inside the LEGEND was not needed, so I removed it
- I would remove all those weird characters from your mapfile, and 
manually type in words like "fossé" and retry
- that weird text could be from a text editor, or opening it in another 
text editor and it saved the mapfile in a different encoding, who knows

Worst case scenario: if that simple mapfile works for one layer and one 
class, rebuilt the entire mapfile and all layers, inside that simple 
mapfile (yes, painful, but sometimes you "gotta do what you gotta do".

-jeff

-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-08-01 6:55 AM, Leehan wrote:
> Hello,
>
> I have created a wms to use it in qgis 2.14. In the legend, some layers have
> accents and other don't : you see a small square for example instead of 'ô'.
>
> <http://osgeo-org.1560.x6.nabble.com/file/n5278901/Capture1.png>
>
>  The difference in the mapfile is that some letters have been replaced...but
> I didn't do that or i don't remember how !
>





More information about the MapServer-users mailing list