[mapserver-users] Re: GetFeatureInfo request in UTF8-environment

Tom van der Putte tom at vdputte.nl
Tue Feb 8 09:12:50 PST 2011


Hi,

I had a similar issue, and the solution I used works but is labour intensive. I'm working mobile right now so I can't send you the link, but the solution is on the Esri forum somewhere. It concerns setting a registry key to a certain value. After this, restart ArcGIS (assuming you have this) add the shapefile, and then export it by rightclicking it in the table of contents->
export data. Save it as a different file, and the attribute data will be in UTF8.

I'll see if I have the link somewhere tonight. 

Cheers,
Tom

mapserver-users-request at lists.osgeo.orgschreef:

>Send mapserver-users mailing list submissions to
>	mapserver-users at lists.osgeo.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	http://lists.osgeo.org/mailman/listinfo/mapserver-users
>or, via email, send a message with subject or body 'help' to
>	mapserver-users-request at lists.osgeo.org
>
>You can reach the person managing the list at
>	mapserver-users-owner at lists.osgeo.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of mapserver-users digest..."
>
>
>Today's Topics:
>
>   1. size of legend icon for pixmap-type classes (NASUNO Isao)
>   2. GetfeatureInfo-Request in an UTF-8 environment	with shapfile
>      in cp-1252 (Siegel Andreas)
>   3. Re: GetfeatureInfo-Request in an UTF-8 environment	with
>      shapfile in cp-1252 (Jeff McKenna)
>   4. RE: size of legend icon for pixmap-type classes
>      (Lime, Steve D (DNR))
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Tue, 08 Feb 2011 17:42:23 +0900
>From: NASUNO Isao <isao.nasuno at ctc-g.co.jp>
>Subject: [mapserver-users] size of legend icon for pixmap-type classes
>To: mapserver-users at lists.osgeo.org
>Message-ID: <4D5101EF.9000802 at ctc-g.co.jp>
>Content-Type: text/plain; charset=ISO-2022-JP
>
>Hello all,
>
>I'm trying to make mapfile which includes polygon layer
>with pixmap-type symbol classes.
>
>The symbols are defined like ...
>---------------------
>SYMBOL
>    NAME "symbol1"
>    TYPE pixmap
>    image /somewhere/symbol1.gif
>    transparent 1
>END
>---------------------
>
>The polygon layer with pixmap is drawn perfectly by map mode,
>however in legend mode (mode=legend), the icons drawn like line layer.
>How do I say... it seems that mapserver draws icon for line ( /\/ )
>like ArcMap's line layer using "brush" of the gif image.
>
>I defined the layer certainly as "type polygon".
>
>
>---------------------
>  layer
>   name "jimon"
>   connectiontype postgis
>   connection "user=db password=xxxxxxx dbname=DB host=localhost port=5432"
>   data "the_geom from polygon"
>   status on
>   type polygon
>   classitem "id"
>   projection
>    "init=epsg:4326"
>   end
>
>   class
>    name "pattern1 "
>    expression "1"
>    style
>      symbol "symbol1"
>    end
>   end
>  end
>---------------------
>
>What I want is normal rectangle-shaped icons filled up with the gif.
>
>Could anyone help me ?
>
>Thanks,
>
>Isao NASUNO
>
>
>------------------------------
>
>Message: 2
>Date: Tue, 8 Feb 2011 15:37:35 +0100
>From: "Siegel Andreas" <Andreas.Siegel at vorarlberg.at>
>Subject: [mapserver-users] GetfeatureInfo-Request in an UTF-8
>	environment	with shapfile in cp-1252
>To: <mapserver-users at lists.osgeo.org>
>Message-ID:
>	<5FBE485F93722E4589047FAB5195B63C051B09B8 at AVLRBRCL08A.net.vlr.gv.at>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi.
> 
>Our mapserver-eniromnent entirely works in utf-8 (mapfiles, webserver, postgres, ..) with one exception, that is, all of our shapefiles.
>The shapfiles are created/updated in an Windows-environment by several, external contributors.
>Hence they are encoded in Wiindows-ANSI (cp: 1252).
> 
>If i do an GetFeatureInfo-Request on the attibutes of the shapefiles all special characters ("umlauts") are garbled. 
>This is no wonder since the content of the shapefile-attributes must be recoded to utf-8 prior to insertion in the template.html.  
> 
>How can this be acomplished? I could not find anything useful in the documentation or with google.
> 
> 
>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/20110208/b94ad66d/attachment-0001.html
>
>------------------------------
>
>Message: 3
>Date: Tue, 08 Feb 2011 10:48:49 -0400
>From: Jeff McKenna <jmckenna at gatewaygeomatics.com>
>Subject: Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8
>	environment	with shapfile in cp-1252
>To: mapserver-users at lists.osgeo.org
>Message-ID: <4D5157D1.3050508 at gatewaygeomatics.com>
>Content-Type: text/plain; charset=UTF-8; format=flowed
>
>Hello,
>
>A quick thought that I had when I read your issue, is that I recently 
>came across a similar issue when I was working with Japanese data.  In 
>that case for MapServer to display query results in my template 
>properly, I had to change the character set in the HTML template file, 
>otherwise the characters would be garbled:
>
><!-- MapServer Template -->
><html>
><head>
><meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
><title>������</title>
>...
>
>I'm not sure if that is related to your exact issue, but those are my 
>quick thoughts.
>
>-jeff
>
>
>-- 
>Jeff McKenna
>MapServer Consulting and Training Services
>http://www.gatewaygeomatics.com/
>
>
>
>
>On 11-02-08 10:37 AM, Siegel Andreas wrote:
>> Hi.
>> Our mapserver-eniromnent entirely works in utf-8 (mapfiles, webserver,
>> postgres, ..) with one exception, that is, all of our shapefiles.
>> The shapfiles are created/updated in an Windows-environment by several,
>> external contributors.
>> Hence they are encoded in Wiindows-ANSI (cp: 1252).
>> If i do an GetFeatureInfo-Request on the attibutes of the shapefiles all
>> special characters ("umlauts") are garbled.
>> This is no wonder since the content of the shapefile-attributes must be
>> recoded to utf-8 prior to insertion in the template.html.
>> How can this be acomplished? I could not find anything useful in the
>> documentation or with google.
>> *Mag Andreas Siegel*
>
>
>------------------------------
>
>Message: 4
>Date: Tue, 8 Feb 2011 10:23:59 -0600
>From: "Lime, Steve D (DNR)" <Steve.Lime at state.mn.us>
>Subject: RE: [mapserver-users] size of legend icon for pixmap-type
>	classes
>To: NASUNO Isao <isao.nasuno at ctc-g.co.jp>,
>	"mapserver-users at lists.osgeo.org"	<mapserver-users at lists.osgeo.org>
>Message-ID:
>	<A7F7B3043D3BF0438F1206BAA3C9933C082682318C at MNMAIL05.ead.state.mn.us>
>Content-Type: text/plain; charset="us-ascii"
>
>What version are we talkin'?
>
>Steve
>
>-----Original Message-----
>From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of NASUNO Isao
>Sent: Tuesday, February 08, 2011 2:42 AM
>To: mapserver-users at lists.osgeo.org
>Subject: [mapserver-users] size of legend icon for pixmap-type classes
>
>Hello all,
>
>I'm trying to make mapfile which includes polygon layer
>with pixmap-type symbol classes.
>
>The symbols are defined like ...
>---------------------
>SYMBOL
>    NAME "symbol1"
>    TYPE pixmap
>    image /somewhere/symbol1.gif
>    transparent 1
>END
>---------------------
>
>The polygon layer with pixmap is drawn perfectly by map mode,
>however in legend mode (mode=legend), the icons drawn like line layer.
>How do I say... it seems that mapserver draws icon for line ( /\/ )
>like ArcMap's line layer using "brush" of the gif image.
>
>I defined the layer certainly as "type polygon".
>
>
>---------------------
>  layer
>   name "jimon"
>   connectiontype postgis
>   connection "user=db password=xxxxxxx dbname=DB host=localhost port=5432"
>   data "the_geom from polygon"
>   status on
>   type polygon
>   classitem "id"
>   projection
>    "init=epsg:4326"
>   end
>
>   class
>    name "pattern1 "
>    expression "1"
>    style
>      symbol "symbol1"
>    end
>   end
>  end
>---------------------
>
>What I want is normal rectangle-shaped icons filled up with the gif.
>
>Could anyone help me ?
>
>Thanks,
>
>Isao NASUNO
>_______________________________________________
>mapserver-users mailing list
>mapserver-users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
>------------------------------
>
>_______________________________________________
>mapserver-users mailing list
>mapserver-users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>End of mapserver-users Digest, Vol 37, Issue 13
>***********************************************


More information about the MapServer-users mailing list