The error:<div><div>Importing shapefile (1267 records)...</div><div>Unable to convert data value to UTF-8 (iconv reports "Illegal byte sequence"). Current encoding is "UTF-8". Try "LATIN1" (Western European), or one of the values described at <a href="http://www.postgresql.org/docs/current/static/multibyte.html">http://www.postgresql.org/docs/current/static/multibyte.html</a>.</div>
<div><br></div><div>Shapefile import failed.</div><div><br></div><br><div class="gmail_quote">2011/3/14 Andreas Forø Tollefsen <span dir="ltr"><<a href="mailto:andreasft@gmail.com">andreasft@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br></div><div>I am trying to import this shapefile into a database on my new server: </div><div><a href="http://sedac.ciesin.columbia.edu/povmap/downloads/ds_global/imr_shapefile.zip" target="_blank">http://sedac.ciesin.columbia.edu/povmap/downloads/ds_global/imr_shapefile.zip</a></div>

<div><br></div><div>While this was no problem on my old server running Windows Vista, i now have problems on my Ubuntu Server.</div><div>My last server had the LC_COLLATE AND LC_CTYPE blank, while the new Linux has en_US.UTF-8 which seems to create the problems.</div>

<div>I tried creating a new database on the new server with blank COLLATE and CTYPE, but it would not accept blank.</div><div><br></div><div>Any ideas?</div><div><br>Thanks,</div><div>Andreas</div><div><br></div><div>The old database had the following settings on Enconding:</div>

<div><div>CREATE DATABASE newpg</div><div>  WITH OWNER = -----</div><div>       ENCODING = 'UTF8'</div><div>       TABLESPACE = pg_default</div><div>       LC_COLLATE = ''</div><div>       LC_CTYPE = ''</div>

<div>       CONNECTION LIMIT = -1;</div></div><div><br></div><div>The database on the new server has the following:</div><div>CREATE DATABASE priogrid</div><div><div>  WITH OWNER = -----</div><div>       ENCODING = 'UTF8'</div>

<div>       TABLESPACE = pg_default</div><div>       LC_COLLATE = 'en_US.UTF-8'</div><div>       LC_CTYPE = 'en_US.UTF-8'</div><div>       CONNECTION LIMIT = -1;</div></div>
</blockquote></div><br></div>