Hi Sandro. Thank you very much for your answer.<div><br></div><div>With that parameter (-W), am I changing the encoding of the DB or I am merely indicating the encoding of the source?</div><div><br></div><div>Regards.<br><br>
<div class="gmail_quote">On Tue, May 8, 2012 at 3:13 PM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Tue, May 08, 2012 at 02:56:28PM +0200, Mac Wind wrote:<br>
> Hi.<br>
><br>
> Using PostGIS 1.5 on Windows, I get this error message when trying to<br>
> import a SHP:<br>
> ----------------<br>
> Unable to convert data value to UTF-8 (iconv reports "Invalid argument").<br>
> Current encoding is "UTF-8". Try "LATIN1" (Western European), or one of the<br>
> values described at<br>
> <a href="http://www.postgresql.org/docs/current/static/multibyte.html" target="_blank">http://www.postgresql.org/docs/current/static/multibyte.html</a>.<br>
> ----------------<br>
><br>
> Really my data are in Latin1 encoding, but I don't want to change the<br>
> encoding of the DataBase into Latin1, but change the encoding of the SHP<br>
> (in fact, of the DBF) into UTF-8.<br>
><br>
> Which tool could I use to do this? Thank you very much.<br>
<br>
</div></div>You don't have to change DB encoding, just tell the loader that your<br>
data is in Latin1:<br>
<br>
 $ shp2pgsql -W Latin1 ...<br>
<br>
--strk;<br>
<br>
  ,------o-.<br>
  |   __/  |    Delivering high quality PostGIS 2.0 !<br>
  |  / 2.0 |    <a href="http://strk.keybit.net" target="_blank">http://strk.keybit.net</a> - <a href="http://vizzuality.com" target="_blank">http://vizzuality.com</a><br>
  `-o------'<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>
</blockquote></div><br></div>