[postgis-users] UTF8 Error when importing Tiger County shapefile

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jun 28 10:50:44 PDT 2011


I have not used the import wizard, but all Tiger data is in LATIN1 so 
when I import that data into postgis using the shp2pgsql utility into a 
UTF8 database, I specify -W LATIN1 so the import know to convert the 
LATIN1 data into UTF8.

-Steve

On 6/28/2011 1:32 PM, Christian Guirreri wrote:
> I'm trying to import the Tiger 2010 County and equivalent shapefile for
> the entire US. Its tl_2010_us_county10 found here:
> http://www.census.gov/cgi-bin/geo/shapefiles2010/main
>
> I create a new database with Encoding UTF8, template_postgis. If I
> choose anything other than UTF8, it will not allow me to use the postgis
> template.
>
> I then use the Shape to PostGIS Importer wizard, change the SRID to
> 4269, but otherwise leave everything on default. It starts to import,
> but stops early and here's there error:
>
> .....
> Shapefile type: Polygon
> Postgis type: MULTIPOLYGON[2]
> Importing shapefile (3221 records)...
> Unable to convert data value to UTF-8 (iconv reports "Invalid
> argument"). Current encoding is "UTF-8". Try "LATIN1" (Western
> European), or one of the values described at
> http://www.postgresql.org/docs/current/static/multibyte.html.
>
> Shapefile import failed.
>
>
>
>
>
> _______________________________________________
> 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