[postgis-users] problems with shp2pgsql
Bruce Rusk
barusk at gmail.com
Tue May 1 05:37:50 PDT 2007
I'm having a problem using shp2pgsql to convert a set of shapefiles.
Some of the records created have values that are not properly enclosed
in quotation marks: there is any open quote but not closing quote for
one of the VALUES.
The data I'm working with is UTF-8; there is a particular string in it
that causes problems. When a field has the following sequence of
characters, shp2pgsql fails to add the second quote:
U+6682 U+65E0
In the data, this is a common value for one of the text fields. In the
.sql file, it converts to a byte sequence that somehow ends up 'eating'
the close quote. From the opening quote, the offending bytes are, ending
with the comma:
27 e6 9a 82 e6 97 a7 2c
One hint: in the WIN-1252 codepage, 82 is U+201A SINGLE LOW-9 QUOTATION
MARK.
There is at least one other string that causes this type of problem,
though I haven't yet figured out what the original .text is there. Any
suggestions of fixes/causes?
I'm running the latest POSTGIS release on Win XP SP2.
Thanks,
Bruce Rusk
More information about the postgis-users
mailing list