[Geoserver-users] Japanese characters in GeoServer

Hi list,
I am having some issues with GeoServer rendering Japanese and Chinese
characters. GeoServer renders boxes for each character. It does not do
this for Arabic characters. I am not sure what the point of failure is.
Can anyone with experience with this issue enlighten me? Do I need to
setup anything special in Java to support Japanese and Chinese
characters? Also, I know this was a bug before. Is this a regression?

Set up is OSM data being rendered by GeoServer 1.7.2. The server was
setup following these steps.
http://geoserver.org/display/GEOSDOC/1.1.4+CentOS+(Red+Hat)+5.1+Install

Thanks

--
Ivan Willig
http://opengeo.org
Expert service straight from the developers.

Ivan Willig ha scritto:

Hi list, I am having some issues with GeoServer rendering Japanese and Chinese
characters. GeoServer renders boxes for each character. It does not do
this for Arabic characters. I am not sure what the point of failure is.
Can anyone with experience with this issue enlighten me? Do I need to
setup anything special in Java to support Japanese and Chinese
characters? Also, I know this was a bug before. Is this a regression?

Set up is OSM data being rendered by GeoServer 1.7.2. The server was
setup following these steps. http://geoserver.org/display/GEOSDOC/1.1.4+CentOS+(Red+Hat)+5.1+Install

Hum, I used the OSM database dump you gave me some time ago,
setup a simple red dot + label style and looked over Japan with
it, and I'm getting the attached image, using the following wms
request:

http://localhost:8080/geoserver/wms?LAYERS=topp%3Aworld_boundaries%2Ctopp%3Aplanet_osm_point&SRS=EPSG%3A4326&HEIGHT=351&WIDTH=800&STYLES=,pointname&FORMAT=image%2Fpng8&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=136.75004405561768,34.82553207590814,137.05216646553882,34.95808828326105

Thought I'm not able to read Japanese, the labels look legit to me?
I also see the same chars appearing in the GetFeatureInfo response
of the GeoServer map preview.

I know that sometimes ago I installed extra-super-full i18n support
on my windows machine so I have special fonts and whatnot to support
most scripts around, but I did not do anything specific to Java itself.

Unfortunately I have no idea of what it would take to get the same
result on Linux or Mac OSX, simply never tried.

Cheers
Andrea

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

japaneseLabels.png

In the past, I have had to install extra fonts on Linux platform to get Asian character support working in GeoServer (and in J2EE generally). It wasn't a huge deal. I was able to find free, open-licensed fonts for pretty much all the languages in which I was interested. I did need to "install" them, in the sense of put them where Java could find them and alter some config files to let J2EE know that they existed.

If you are using Java 6, then take a look at:

http://java.sun.com/javase/6/docs/technotes/guides/intl/fontconfig.html

For Java 5, it's:

http://java.sun.com/j2se/1.5.0/docs/guide/intl/fontconfig.html

I was able to get Chinese, Devangari, Tibetan, and more, all playing happily in one Community MapBuilder application, all displayed together. Good luck!

---
A. Soroka / Digital Scholarship Services R & D
the University of Virginia Library

On Feb 5, 2009, at 10:14 AM, Andrea Aime wrote:

Ivan Willig ha scritto:

Hi list, I am having some issues with GeoServer rendering Japanese and Chinese
characters. GeoServer renders boxes for each character. It does not do
this for Arabic characters. I am not sure what the point of failure is.
Can anyone with experience with this issue enlighten me? Do I need to
setup anything special in Java to support Japanese and Chinese
characters? Also, I know this was a bug before. Is this a regression? Set up is OSM data being rendered by GeoServer 1.7.2. The server was
setup following these steps. http://geoserver.org/display/GEOSDOC/1.1.4+CentOS+(Red+Hat)+5.1+Install

Hum, I used the OSM database dump you gave me some time ago,
setup a simple red dot + label style and looked over Japan with
it, and I'm getting the attached image, using the following wms
request:

http://localhost:8080/geoserver/wms?LAYERS=topp%3Aworld_boundaries%2Ctopp%3Aplanet_osm_point&SRS=EPSG%3A4326&HEIGHT=351&WIDTH=800&STYLES=,pointname&FORMAT=image%2Fpng8&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=136.75004405561768,34.82553207590814,137.05216646553882,34.95808828326105

Thought I'm not able to read Japanese, the labels look legit to me?
I also see the same chars appearing in the GetFeatureInfo response
of the GeoServer map preview.

I know that sometimes ago I installed extra-super-full i18n support
on my windows machine so I have special fonts and whatnot to support
most scripts around, but I did not do anything specific to Java itself.

Unfortunately I have no idea of what it would take to get the same
result on Linux or Mac OSX, simply never tried.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
<japaneseLabels.png>------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users