[mapserver-users] how does mapserver determine shapefile encoding?

Lars Lingner gislars+list at googlemail.com
Tue Aug 2 12:45:35 PDT 2011


Hello,

I have a shapefile from which I don't really know the encoding. It might
be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing
the shapefile, the labels are shown correct.
QGis is also displaying everything fine.

But when I try to convert with shp2pgsql or ogr I get only garbage back.
I tried different source encodings. Since I need the data to be in the
database I'm now trying to find out where the problem is.

I tried converting the data on different systems (Ubuntu, RedHat), with
postgis/shp2pgsql from repository as well as self compiled. Same
results. Also iconv and recode wasn't a help.

As I said QGis is displaying everything fine it fails in converting the
shapefile too. Opening the dbf in LibreOffice doesn't helped either.

Finally my (odd) questions are: Why does MapServer do everything right?
How is the encoding determined? Can I see somewhere which encoding is
used by MapServer?

Thanks in advance for any pointers.


Lars



More information about the MapServer-users mailing list