Re: [Geoserver-jp] GetFeatureと日本語のパラメータ名
Daniel Kastl
daniel @ georepublic.de
2010年 10月 27日 (水) 22:03:29 EDT
Hi Mario,
Thanks for sharing this!
I remember some issues Anton and I had some time ago, and it seemed that not
only Japanese but also other languages had problems with special characters.
Didn't I even write you an email that time?
Well, I think it would be nice to have some "Encoding" tutorial on the main
Geoserver website.
Any idea how to post there?
Daniel
2010/10/27 Mario Basa <mario.basa at gmail.com>
> Hello again.
>
> I was really having problems with a Geoserver WFS request to a PostGIS
> (UTF-8) feature that has Japanese parameterName, since it seems that
> Japanese characters are always converted to ISO-8559-1 encoding first.
>
> So this GetFeature request did not work for me:
>
>
> http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=m:census2005&propertyname=人口総数&maxfeatures=1<http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=m:census2005&propertyname=%E4%BA%BA%E5%8F%A3%E7%B7%8F%E6%95%B0&maxfeatures=1>
>
> To fix this, I added a URIEncoding="UTF-8" and
> useBodyEncodingForURI="true" into Tomcat's conf/server.xml Connector
> setting:
>
> <Connector port="8080" protocol="HTTP/1.1"
> connectionTimeout="20000"
> redirectPort="8443" URIEncoding="UTF-8"
> useBodyEncodingForURI="true" />
>
>
> and since I am using an ajp proxy, I added both parameters here as well:
>
> <!-- Define an AJP 1.3 Connector on port 8009 -->
>
> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
> tomcatAuthentification="false"
> URIEncoding="UTF-8" useBodyEncodingForURI="true" />
>
>
> So now, when I make the same GetFeature request I can now get this:
>
> <gml:featureMembers>
> <m:census2005 gml:id="census2005.fid-386b25a0_12bee18cf90_-7ffe">
> <m:人口総数>202801</m:人口総数>
> </m:census2005>
> </gml:featureMembers>
>
>
>
> Hope that somebody might find this useful.
>
> Regards,
>
> Mario.
>
> _______________________________________________
> geoserver-jp mailing list
> geoserver-jp at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geoserver-jp
>
>
--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geoserver-jp/attachments/20101028/f0f57540/attachment.html
geoserver-jp メーリングリストの案内