(chinese) unicode labeling with postgis db
Christian Sengstock
csengstock at GMAIL.COM
Wed Feb 14 03:37:40 PST 2007
Hi list,
i try to do labeling for chinese features but have some problems.
I tried to make it the way i found in some docs in the internet and in
the mail archive:
- use a postgis unicode db
- use unicode truetype fonts
But unfourtunately its not working for now.
I use a postgres/postgis dbms (PostgreSQL 8.0.9 POSTGIS 1.0.6) and
mapserver 4.10.0 (ms4w package).
My database is UNICODE encoded (imported with GB18030 client encoding).
The unicode chars seem to be ok, i can use these chinese strings in my
web application and they work.
I have a point layer which i render with UMN mapserver.
Now i tried to render the points like this...
LAYER
NAME 'poi'
TYPE POINT
CONNECTIONTYPE postgis
CONNECTION '...'
DATA 'geom FROM geo.poi'
METADATA
'wms_title' 'poi'
END
STATUS ON
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
LABELITEM 'name'
CLASS
NAME poi
STYLE
SYMBOL 'circle'
SIZE 3
COLOR 255 150 150
END
LABEL
ANTIALIAS true
COLOR 255 255 255
OUTLINECOLOR 0 0 0
POSITION CC
OFFSET 0 2
BUFFER 2
TYPE TRUETYPE
FONT 'arialuni'
ANGLE auto
SIZE 8
#ENCODING UTF-8 | UNICODE ???
END
END
END
where font 'arialuni' ist the microsoft arial unicode font:
arialuni ARIALUNI.TTF
If i use ENCODING UNICODE, its no labels at all.
If i use ENCODING UTF-8 (or GB18030), its like i have no ENCODING attribute.
Attached is a screenshot from the map.
Maybe someone can help or can point me to a good doc?
Thanx a lot,
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cn_labels_03.jpg
Type: image/jpeg
Size: 37660 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070214/6f5d3ac8/attachment.jpg>
More information about the MapServer-users
mailing list