[Geoserver-users] Japanese characters in WMS layer name

Hi,

I wonder if non-English characters are supported in GeoServer WMS? I tried
to put some Japanese characters in the alias of a feature type (shape file
based) and it looks like the capabilities responses look good. But when I
actually request map none of the clients work, in which they all return
exception.

Any idea how I can get Japanese characters working in Geoserver?

Thanks,
Yingqi
--
View this message in context: http://www.nabble.com/Japanese-characters-in-WMS-layer-name-tp23972103p23972103.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Yingqi ha scritto:

Hi,

I wonder if non-English characters are supported in GeoServer WMS? I tried
to put some Japanese characters in the alias of a feature type (shape file
based) and it looks like the capabilities responses look good. But when I
actually request map none of the clients work, in which they all return
exception.

Which exception? Can you provide a full stack trace (enable "verbose
exceptions" in config/server)

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea,

Thanks for the response, it's not a Java exception but a WMS exception
saying:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1" > <ServiceException
code="LayerNotDefined">
      Could not find layer topp:???
</ServiceException></ServiceExceptionReport>

The Japanese characters are correct in GetCapabilities response though.

Here is the request I sent:

http://sazabi:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=日本語&amp;STYLES=polygon&amp;FORMAT=image/png&amp;BGCOLOR=0xFFFFFF&amp;TRANSPARENT=TRUE&amp;SRS=EPSG:4326&amp;BBOX=123\.661530852299,23\.6511065060158,148\.895080925309,46\.1305522937712&amp;WIDTH=1017&amp;HEIGHT=906

Also tried:

http://sazabi:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=topp:日本語&amp;STYLES=polygon&amp;FORMAT=image/png&amp;BGCOLOR=0xFFFFFF&amp;TRANSPARENT=TRUE&amp;SRS=EPSG:4326&amp;BBOX=123\.661530852299,23\.6511065060158,148\.895080925309,46\.1305522937712&amp;WIDTH=1017&amp;HEIGHT=906

Thanks

Andrea Aime-4 wrote:

Yingqi ha scritto:

Hi,

I wonder if non-English characters are supported in GeoServer WMS? I
tried
to put some Japanese characters in the alias of a feature type (shape
file
based) and it looks like the capabilities responses look good. But when I
actually request map none of the clients work, in which they all return
exception.

Which exception? Can you provide a full stack trace (enable "verbose
exceptions" in config/server)

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Japanese-characters-in-WMS-layer-name-tp23972103p23984615.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Yingqi ha scritto:

Andrea,

Thanks for the response, it's not a Java exception but a WMS exception
saying:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1" > <ServiceException
code="LayerNotDefined">
      Could not find layer topp:???
</ServiceException></ServiceExceptionReport>

The Japanese characters are correct in GetCapabilities response though.

Here is the request I sent:

http://sazabi:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=日本語&amp;STYLES=polygon&amp;FORMAT=image/png&amp;BGCOLOR=0xFFFFFF&amp;TRANSPARENT=TRUE&amp;SRS=EPSG:4326&amp;BBOX=123\.661530852299,23\.6511065060158,148\.895080925309,46\.1305522937712&amp;WIDTH=1017&amp;HEIGHT=906

Also tried:

http://sazabi:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=topp:日本語&amp;STYLES=polygon&amp;FORMAT=image/png&amp;BGCOLOR=0xFFFFFF&amp;TRANSPARENT=TRUE&amp;SRS=EPSG:4326&amp;BBOX=123\.661530852299,23\.6511065060158,148\.895080925309,46\.1305522937712&amp;WIDTH=1017&amp;HEIGHT=906

My guess is that the url can only host ascii chars and that you should
url-encode the japanes chars, but I'm not sure.
Can you try out "%E6%97%A5%E6%9C%AC%E8%AA%9E" instead of "日本語"?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea,

This works, and also I tried it in Firefox (I tested with IE first) which
works automatically. So I guess IE doesn't encode non-English in URL
correctly in UTF-8.

Thanks a lot!

Andrea Aime-4 wrote:

Yingqi ha scritto:

Andrea,

Thanks for the response, it's not a Java exception but a WMS exception
saying:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1" > <ServiceException
code="LayerNotDefined">
      Could not find layer topp:???
</ServiceException></ServiceExceptionReport>

The Japanese characters are correct in GetCapabilities response though.

Here is the request I sent:

http://sazabi:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=日本語&amp;STYLES=polygon&amp;FORMAT=image/png&amp;BGCOLOR=0xFFFFFF&amp;TRANSPARENT=TRUE&amp;SRS=EPSG:4326&amp;BBOX=123\.661530852299,23\.6511065060158,148\.895080925309,46\.1305522937712&amp;WIDTH=1017&amp;HEIGHT=906

Also tried:

http://sazabi:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=topp:日本語&amp;STYLES=polygon&amp;FORMAT=image/png&amp;BGCOLOR=0xFFFFFF&amp;TRANSPARENT=TRUE&amp;SRS=EPSG:4326&amp;BBOX=123\.661530852299,23\.6511065060158,148\.895080925309,46\.1305522937712&amp;WIDTH=1017&amp;HEIGHT=906

My guess is that the url can only host ascii chars and that you should
url-encode the japanes chars, but I'm not sure.
Can you try out "%E6%97%A5%E6%9C%AC%E8%AA%9E" instead of "日本語"?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Japanese-characters-in-WMS-layer-name-tp23972103p23985520.html
Sent from the GeoServer - User mailing list archive at Nabble.com.