<!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>
&nbsp;&nbsp;&nbsp; WMS_ENCODING "UTF-8"<br>
END<br>
...<br>
METADATA (of my layer)<br>
&nbsp;&nbsp;&nbsp; WMS_TITLE "TRONCON_ROUTE par Classement_Administratif_Route"<br>
&nbsp;&nbsp;&nbsp; WMS_EXTENT "73114.958418 1622638.022606 1197702.049962
2676196.041411"<br>
&nbsp;&nbsp;&nbsp; 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&eacute;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 : &lt;?xml version="1.0"
encoding="UTF-8"?&gt;)</li>
  <li>the XML tags name are putted as they're coded in the mapfile
(example : &lt;Nombre_Chauss&eacute;es&gt;1 chauss&#65533;e&lt;/Nombre_Chauss&eacute;es&gt;),</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 : &lt;?xml
version="1.0" encoding="ISO-8859-1"?&gt;<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 : &lt;Nombre_Chauss&Atilde;&copy;es&gt;2
chauss&eacute;es&lt;/Nombre_Chauss&Atilde;&copy;es&gt;).<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>