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

2016-08-02 Thread Leehan
I followed your advice, and finally re-write  my mapfile with a big attention
to my text editor and its encoding. Besides, I have checked layer by layer
that the legend was correct, and it was. I didn't finish yet, but until now
it seems in order.
Thanks a lot



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/mapserver-qgis-legend-and-encoding-tp5278901p5279098.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

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

2016-08-01 Thread Jeff McKenna

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 'ô'.



 The difference in the mapfile is that some letters have been replaced...but
I didn't do that or i don't remember how !




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

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

2016-08-01 Thread Leehan
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 'ô'.

 

 The difference in the mapfile is that some letters have been replaced...but
I didn't do that or i don't remember how !

mapfile : 
CLASS
NAME "fossé"
EXPRESSION ("[interpret]" in "fossé,fossé ?")
STYLE
OUTLINECOLOR "#FF8C00"
WIDTH 0.5
END #end Style
END # fin class fossé

it gives 'fossé' in the legend (qgis). fine !

but 
CLASS
NAME "Côte d'Or"
EXPRESSION '21'
STYLE
COLOR 200 60 70
OUTLINECOLOR 0 0 0
WIDTH 0.5
END #end Style
LABEL
FONT "dejavu"
COLOR 125 125 125
OUTLINECOLOR 255 255 255
OUTLINEWIDTH 1
POSITION cc
SIZE 5
TYPE TRUETYPE
END #ENd
END #end class 21 comm

..gives C*square*e d'Or' : 2 letters missing. You see that in capture above.

In the mapfile, encoded in UTF-8, I just added at the top : 
LEGEND
LABEL
FONT "Arial"
TYPE TRUETYPE
SIZE 8
ENCODING "UTF-8"
END # fin label
END #fin legend

The question is : how to fix accents in class name in the legend ?
Thanks



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/mapserver-qgis-legend-and-encoding-tp5278901.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users