working with database in UTF-8
Jackey Cheung
cheung.jackey at GMAIL.COM
Fri Jun 22 00:56:19 PDT 2007
Greetings!
I'm trying to setup a mapserver that supports multiple languages with MySQL.
The database uses UTF-8, while the map server use a select statement to
retrieve records. The layer goes as:
LAYER
NAME sr
STATUS OFF
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "<OGRVRTDataSource>
<OGRVRTLayer name='sr'>
<SrcDataSource>MYSQL:MapSQL,user=root,password=123456,host=localhost,port=3306,tables=POI</SrcDataSource>
<SrcSQL>SELECT `Name`, geom
FROM `POI` WHERE `ID` = %o%</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
</OGRVRTLayer>
</OGRVRTDataSource>"
DATA "sr"
UNITS METERS
MAXFEATURES 1
LABELITEM "Name"
CLASS
SYMBOL "point"
MINSIZE 10
COLOR 250 0 0
OUTLINECOLOR 0 128 0
LABEL
ENCODING "utf-8"
COLOR 255 0 0
OUTLINECOLOR 255 255 255
TYPE TRUETYPE
FONT arial
SIZE 8
ANTIALIAS TRUE
POSITION UC
PARTIALS FALSE
BUFFER 5
FORCE TRUE
END
END
END
All Chinese characters are shown as question marks (?) on the map, no mater
using arial or Chinese fonts.
Any advise?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070622/27696235/attachment.htm>
More information about the MapServer-users
mailing list