[mapserver-dev] Re: LAYER FILTER ENCODING FRENCH CHARACTERS

mathieu_fortier math_ at hotmail.com
Wed Jun 15 16:38:28 EDT 2011


Here is more detail: 

I'm passing in my URL a variable with french character with that:

            script.AppendScriptLine(
                "var {0} = new OpenLayers.Layer.SigExpressWMS('{9}', '{1}',
{layers: '{2}', format: '{3}', width: '{4}', height: '{5}', transparent:
'{6}', exceptions: '{7}', estInterrogeable: '{10}' , whereClause: '{11}'},
{8});",

                ClientID,
                Url,
                Couches,
                ObtenirChaineFormat(Format),
                Largeur,
                Hauteur,
                Transparent.ToString().ToLower(),
                ObtenirChaineException(_exception),
                ObtenirOptionsCouche(_coucheBase),
                Nom,
                estInterrogeable,
                "Fédérale"); 

When I verify the URL in the application I obtain this:

http://xxxxl00-xxx011.xxx.xxx.xxxxx/MapServer5/mapserv.exe?map=D:/systemes/sigexpress/mapfiles/sigexpress.map&LAYERS=fond_carte%2Chydrographie%2Cfrontiere%2Cfrontiere_anno%2Cdt%2Ccs%2Cmrc%2Cmunicipalite%2Cparc_reserve%2Creseau_ferroviaire%2Croute_verte%2Cres_hosr_quebc%2Cadres_quebc%2Cres_inven_mtq_autrt_secndr%2Crr_petite_echl%2Cres_inven_non_mtq%2Cres_inven_mtq%2Cchemn_forst%2Creseau_elect%2Cres_martm%2Crepr_kilmt%2Cnum_sort_autrt%2Csort_autrt%2Cstructures_toutes%2Ccarrefours%2Cecusn%2Creseau_aerien_20041117%2Clieux_habites%2Crts_symbol&FORMAT=image%2Fpng&WIDTH=256&HEIGHT=256&TRANSPARENT=false&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&ESTINTERROGEABLE=False&WHERECLAUSE=F%C3%A9d%C3%A9rale&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A3799&BBOX=741199.61595221,379799.83540809,842799.56108824,481399.78054412&t=0.8291127340256844

 
The system encode my variable in UTF-8, I think.

After, the MapFile catch this variable in a FILTER under LAYER: 

FILTER ("[JURIDICTIO]" eq "%WHERECLAUSE%")

 
When the MapFile want to do the filter in the SHP, it dosen't work because
in the field the attribute is "Fédérale" and not "F%C3%A9d%C3%A9rale"

When I hardcode the filter with "Fédérale", it works well:

FILTER ("[JURIDICTIO]" eq "Fédérale")

I think this is an ENCODING problem same like the function ENCODING under
LABEL.

Thanks in advance!

Mathieu


 

 



--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/LAYER-FILTER-ENCODING-FRENCH-CHARACTERS-tp6475877p6480476.html
Sent from the Mapserver - Dev mailing list archive at Nabble.com.


More information about the mapserver-dev mailing list