[postgis-users] re: shp2sql and UTF8 question on Windows

Markus Schaber schabi at logix-tt.com
Thu Jan 26 04:41:53 PST 2006


Hi, Strk,

strk at refractions.net wrote:

>>My patch just is a cleaner way of the bash magic we used to set the
>>client_encoding header earlier, before shp2pgsql supported iconv.
>>
>>It was meant as a light-weight solution for those people who have a
>>shp2psql build without iconv for whatever reason.
> 
> Would setting PGOPTIONS work ?
> 
> ./shp2pgsql ... | PGOPTIONS="-c client_encoding=EBCDIC" psql

This could work AFAIK, but it does not store the enconding in the sql
dump. We often save the shp2pgsql output bzip2-compressed (to save
storage and bandwith), one per table and region, and then insert them on
several servers. Currently, this are over 5 gig (40 gig uncompressed) in
2200 files. So it is preferrable to have the encoding inside the sql dump.

For us, we use either iconv or the echo / pipe based shell trick now, so
I don't need the -e option personally.

Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



More information about the postgis-users mailing list