<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi list,<br>
<br>
I have :<br>
<ul>
<li>mapserver 4.99,</li>
<li>a mapfile utf-8 encoded,</li>
<li>a mapinfo file create on windows (encoding cp1252).</li>
</ul>
Extract of my mapfile (utf-8 encoded) :<br>
"...<br>
METADATA (of the map block)<br>
...<br>
WMS_ENCODING "UTF-8"<br>
END<br>
...<br>
METADATA (of my layer)<br>
WMS_TITLE "TRONCON_ROUTE par Classement_Administratif_Route"<br>
WMS_EXTENT "73114.958418 1622638.022606 1197702.049962
2676196.041411"<br>
gml_include_items
"Id_Route120,Vocation,Nombre_Chaussees,Nombre_Voies,Ouverture,Acces,Reseau_Vert,Sens,Reseau_Europeen,Numero_Route,Classement_Administratif_Route,Longueur_Troncon"<br>
gml_Nombre_Chaussees_alias "Nombre_Chaussées"<br>
END<br>
...."<br>
<br>
I have to make WMS/GetFeatureInfo requests (with
INFO_FORMAT=application/vnd.ogc.gml).<br>
I've made several tests and it seems that :<br>
<ul>
<li>WMS_ENCODING doens't encode anything. It just puts the right
header of the XML returned (example : <?xml version="1.0"
encoding="UTF-8"?>)</li>
<li>the XML tags name are putted as they're coded in the mapfile
(example : <Nombre_Chaussées>1 chauss�e</Nombre_Chaussées>),</li>
<li>the XML tags values are putted as they're coded in the data
source (example : see above).</li>
</ul>
So, if I change MWS_ENCODING to ISO-8859-1 (in my mapfile UTF-8
encoded) the only thing that changes is the XML header : <?xml
version="1.0" encoding="ISO-8859-1"?><br>
The tags names and values are not encoded in ISO-8859-1. They're like
I've explain above.<br>
If I try to read my ISO-8859-1 GetFeatureInfo XML with FireFox, it
warns that the XML is not well formed<br>
(in my case at the line : <Nombre_Chaussées>2
chaussées</Nombre_Chaussées>).<br>
<br>
NB : I've tried with GML_ENCODING with the same results.<br>
<br>
If I want all working right I have to :<br>
<ol>
<li>encode my mapfile into the same encoding than my data (it isn't
very easy because I've mapinfo files in cp1252 and PostGIS data in
utf-8),</li>
<li>use WMS_ENCODING with ISO-8859-1 value (that is the default
value).</li>
</ol>
I wonder if I have all understood !<br>
I would like that someone explains to me what I have not understood
and/or what I'm doing wrong.<br>
<br>
Thanks for help<br>
</body>
</html>