[postgis-users] shp2pgsql and encoding issues

Kralidis,Tom [Burlington] Tom.Kralidis at ec.gc.ca
Tue May 24 08:37:16 PDT 2005


Hi,

I have some polygon data in the form of a .shp/.shx/.dbf set which I'd
like to store in PostGIS.  The .dbf table has some French characters

My database is set in UNICODE, but judging from the errors below, it
looks like the .dbf data is NOT in unicode.  I'm not sure how shp2pgsql
deals with languages, or whether this is resolved from the DB config, or
shell environment variables, or both, etc.

Here is the output of my shp2pgsql attempt:

$ /usr/local/pgsql/bin/shp2pgsql  -s 42304 wshed_p public.wshed_p |
/usr/local/pgsql/bin/psql -d devgeodb -U postgres
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
BEGIN
NOTICE:  CREATE TABLE will create implicit sequence "wshed_p_gid_seq"
for serial column "wshed_p.gid"
CREATE TABLE
                      addgeometrycolumn
-------------------------------------------------------------
 public.wshed_p.the_geom SRID:42304 TYPE:MULTIPOLYGON DIMS:2
 geometry_column fixed:0
(1 row)

INSERT 25196 1
INSERT 25198 1
INSERT 25200 1
INSERT 25203 1
INSERT 25206 1
INSERT 25208 1
INSERT 25211 1
INSERT 25213 1
ERROR:  Unicode characters greater than or equal to 0x10000 are not
supported
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
Cancel request sent
ERROR:  current transaction is aborted, commands ignored until end of
transaction block

Any ideas or suggestions would be much appreciated.

Thanks

..Tom

=========================
Tom Kralidis
Senior Systems Scientist
Environment Canada
Tel: +01-905-336-4409
http://www.ec.gc.ca/



More information about the postgis-users mailing list