[mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252

Siegel Andreas Andreas.Siegel at vorarlberg.at
Wed Feb 9 01:19:31 PST 2011


Hi Tom.
 
Thanks for your reply. But no, it is not an issue with ArcGIS.
The link you sent me may prove useful anyway since we rely heavy on shapefiles and ArcGIS ist used by several of our colleges and contributors.
 
My issue is this line of code:
<meta http-equiv="Content-Type" content="text/html"; charset=MacThai"></meta>
Please note the charset MacThai. 
This charset should render my results illegible but it has no effect at all.
 
I test it by using a browser:
http://vogis.cnv.at/mapserver/mapserv?map=a.map&LAYERS=umlauttest&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/jpeg&SRS=EPSG:31254&BBOX=-49500,246750,-49000,247250&X=250&Y=250&INFO_FORMAT=text/html&QUERY_LAYERS=umlauttest&WIDTH=650&HEIGHT=650&FEATURE_COUNT=30
 
 and the commandline.
./mapserv -nh "QUERY_STRING=map=a.map&LAYERS=umlauttest&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/jpeg&SRS=EPSG:31254&BBOX=-49500,246750,-49000,247250&X=250&Y=250&INFO_FORMAT=text/html&QUERY_LAYERS=umlauttest&WIDTH=650&HEIGHT=650&FEATURE_COUNT=30"

The commandline output can be inspected by hexdump -C
 
./mapserv -nh "QUERY_STRING=map=a.map&LAYERS=umlauttest&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/jpeg&SRS=EPSG:31254&BBOX=-49500,246750,-49000,247250&X=250&Y=250&INFO_FORMAT=text/html&QUERY_LAYERS=umlauttest&WIDTH=650&HEIGHT=650&FEATURE_COUNT=30" | hexdump -c
 
This allows to inspect the result without some unwanted/unnoticed code translations when using an editor or the browser,

This are the HTML-Templates:
Header:
<!-- MapServer Template -->
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd <http://www.w3.org/TR/html4/transitional.dtd> ">
 
<html>
 
<head>
 
 <!-- enforce the client to display result html as UTF-8 encoding -->
 <meta http-equiv="Content-Type" content="text/html"; charset=MacThai"></meta>
 
 <style type="text/css">
 
  table, th, td {
   border:1px solid #e5e5e5;
   border-collapse:collapse;
   font-family: arial;
   font-size: 80%;
   color: #333333
  }
 
  th, td {
   valign: top;
   text-align: center;
  }
 
 th {
  background-color: #aed7ff
 }
 
 caption {
  border:1px solid #e5e5e5;
  border-collapse:collapse;
  font-family: arial;
  font-weight: bold;
  font-size: 80%;
  text-align: left;
  color: #333333;
 }
 
 </style>
 <title>GetFeatureInfo Response</title>
</head>
 
<body>
 <table>
 
  <caption>Widmungsart Zeichensatztest ae ä oe ö ue ü AE Ä OE Ö UE Ü scharfes s ß Ende</caption>
 
 <tbody>
  <th>Kuerzel</th>
  <th>Widmungsart</th>
  <th>Flaeche</th>
  <th>Text</th>
 
 
TEMPLATE:
 <!-- MapServer Template -->
     <tr>
       <td>[item name=WI_EM_KN format=$value escape=none]</td>
       <td>[item name=WI_EM_TXT format=$value escape=none]</td>
       <td>[item name=Flaeche format=$value escape=none]</td>
       <td>[item name=FS_TXT  format=$value escape=none]</td>
     </tr>
 
 
FOOTER:
 <!-- MapServer Template -->
       </tbody>
     </table>
     <br/>
   </body>
</html>
 
 
 
 
 


 
 
 
 
 
 
 
Mag Andreas Siegel
Landesvermessungsamt Feldkirch
Johannitergasse 6, A-6800 Feldkirch
Tel: +43(0) 5522 / 75482 - 60227
Fax: +43(0) 5522 / 75482 - 6
E-Mail: andreas.siegel at vorarlberg.at <mailto:andreas.andreas.sandreas.siegel at vorarlberg.at> 
http://www.vorarlberg.at/lva
 
Rechtsverbindlichen Schriftverkehr
(zB Anträge, Rechtsmittel) richten Sie an:
E-Mail: landesvermessungsamt at vorarlberg.at
Fax: +43(0)5522/75482-6
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110209/18b0319d/attachment.htm>


More information about the MapServer-users mailing list