<div dir="ltr">Hi Paul,<div><br></div><div>Thanks for answering my question.  Do you know of anyway to tell which bit encoding is used on a file.  My data is coming from the middle east and I don't know if the data is bad, or if I'm specifying the wrong encoding.  For example, using either LATIN1 and Cp1256 will execute without error, but the data isn't responding the way I expected so I'm unsure if there is a problem with the encoding or just the data.</div>
<div><br></div><div>Thank you for your help,</div><div><br></div><div>Nick<br><br><div class="gmail_quote">On Fri, Sep 26, 2008 at 3:18 PM, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You don't need iconv, you can use the -W flag in shp2pgsql:<br>
<br>
shp2pgsql -W LATIN1 -s 4366 -D foo.shp foo<br>
<br>
If you're in a western country, your encoding is likely either LATIN1<br>
or WIN1252 (they are almost identical, the WIN one has some Windows<br>
special characters in it).<br>
<br>
Here's the list of possibilities:<br>
<br>
<a href="http://www.postgresql.org/docs/8.1/static/multibyte.html" target="_blank">http://www.postgresql.org/docs/8.1/static/multibyte.html</a><br>
<font color="#888888"><br>
P.<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Fri, Sep 26, 2008 at 12:05 PM, paul919 <<a href="mailto:nrpaul@gmail.com">nrpaul@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> I am trying to import data into a PostGIS database that is using the UTF8<br>
> bit encoding.  However several of the .shp files that i am importing have a<br>
> different bit encoding and it will not let me import the data into PostGIS<br>
> unless the bit encodings are the same.  First question, is there anyway<br>
> around this?<br>
><br>
> If not, I can use the linux iconv utility to convert the files to the<br>
> correct UTF8 bit encoding, however i need to know what the current encoding<br>
> is on the files.  Second question, how do i determine the bit encoding on a<br>
> file?<br>
><br>
> Thank you in advance for you help.<br>
> --<br>
> View this message in context: <a href="http://www.nabble.com/Determining-file%27s-bit-encoding-tp19694595p19694595.html" target="_blank">http://www.nabble.com/Determining-file%27s-bit-encoding-tp19694595p19694595.html</a><br>

> Sent from the PostGIS - User mailing list archive at Nabble.com.<br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div></div>