[postgis-users] Determining file's bit encoding

Paul Ramsey pramsey at cleverelephant.ca
Fri Sep 26 12:18:55 PDT 2008


You don't need iconv, you can use the -W flag in shp2pgsql:

shp2pgsql -W LATIN1 -s 4366 -D foo.shp foo

If you're in a western country, your encoding is likely either LATIN1
or WIN1252 (they are almost identical, the WIN one has some Windows
special characters in it).

Here's the list of possibilities:

http://www.postgresql.org/docs/8.1/static/multibyte.html

P.

On Fri, Sep 26, 2008 at 12:05 PM, paul919 <nrpaul at gmail.com> wrote:
>
> Hello,
>
> I am trying to import data into a PostGIS database that is using the UTF8
> bit encoding.  However several of the .shp files that i am importing have a
> different bit encoding and it will not let me import the data into PostGIS
> unless the bit encodings are the same.  First question, is there anyway
> around this?
>
> If not, I can use the linux iconv utility to convert the files to the
> correct UTF8 bit encoding, however i need to know what the current encoding
> is on the files.  Second question, how do i determine the bit encoding on a
> file?
>
> Thank you in advance for you help.
> --
> View this message in context: http://www.nabble.com/Determining-file%27s-bit-encoding-tp19694595p19694595.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list