mapnik Filer : multibyte encoding support (e.g. utf-8 or sjis ) #1153

pockel opened this Issue Mar 31, 2012 · 0 comments


None yet
1 participant

pockel commented Mar 31, 2012

I have Japanese geo-spatial data in shalefile format.
In this shapefile, some attribute's name have Shift-jis encoding characters.
I could retrieve the attribute name and the values in Shift-jis by osgeo.ogr Python binding.
So I tried to make an image map from this shapefile and use mapnik's Filter function.
Then I recieved error messages as followings,

 File "../", line 18, in <module>
    rule.filter = mapnik.Filter("[**] = ' --'")
RuntimeError: Failed to parse filter expression:
[**] = '--'
Parsing aborted at '['

(**, and -- are Japanese in Shift-JIS or UTF-8. )

Please support to treat multibyte encoding in Filter function.

The shapefiles are available from following links.
For example, the attribute name contains "名称", and "行政コード" in AdmArea shapefile. etc.
(These shapefile's content is of Shizuoka Prefecture of Japan, in 1/25000 scale.)
In addition of AdmArea, there are AdmBdry, AdmPt, BldA, Cntr, Cstline, ElvPt, RailCL, RdEdg, WL shapefiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment