[postgis-users] shp2pgsql UTF-8 Encoding Problem

Paul Ramsey pramsey at refractions.net
Mon Feb 19 13:17:54 PST 2007


Or maybe the one you want is WIN1252 :)  Particularly if you have some 
fun Windoze characters (like left/right quotes) in your data.

P

Paul Ramsey wrote:
> The list of encodings is here:
> 
> http://www.postgresql.org/docs/8.1/static/multibyte.html
> 
> What you want to provide in -W is not the database encoding (that's 
> already known) but rather the encoding of the strings in your DBF file. 
> If it's a European language, probably the encoding you want is LATIN1.
> 
> Paul
> 
> paallen at attglobal.net wrote:
>> Hi all,
>>
>> I am using Windows XP SP2 (USA English),
>> PostgreSQL 8.2 and PostGIS 1.2.0-1
>> I have a database with UTF-8 encoding and I am
>> trying to import a multipolygon shape file with
>> shp2pgsql and it keeps giving me an encoding error
>> upon loading it into the database.  I know this is
>> due to the UNICODE and I found some listings about
>> this from 2005 but my encoding skills are weak.
>>
>> I have used the shp2pgsql with -w and no better
>> luck.  I have changed the code page first with
>> “chcp 1252” and still no luck.  Whenever I use the
>> “-W UTF-8” it bombs out because “UTF-8” is not a
>> recognized code. 
>> What are the window's users procedures to import
>> an plan-jane US ASCII shape file into an UTF-8
>> database.  I am interested in passing this stage
>> so I can experiment with the latest ZigGIS release!
>>
>> Thanks a lot.
>>
>> Phillip J. Allen
>> Consulting Geochemist
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 


-- 

   Paul Ramsey
   Refractions Research
   http://www.refractions.net
   pramsey at refractions.net
   Phone: 250-383-3022
   Cell: 250-885-0632



More information about the postgis-users mailing list