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

Christian Guirreri christian at guirreri.com
Wed Jun 29 12:37:23 PDT 2011


That worked - thanks! In the wizard, there's an option to change the
encoding that I didn't realize was directly related ("DBF file character
encoding").

On Tue, Jun 28, 2011 at 1:50 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> wrote:

> 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<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<http://www.postgresql.org/docs/current/static/multibyte.html>
>> .
>>
>> Shapefile import failed.
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> postgis-users mailing list
>> postgis-users at postgis.**refractions.net<postgis-users at postgis.refractions.net>
>> http://postgis.refractions.**net/mailman/listinfo/postgis-**users<http://postgis.refractions.net/mailman/listinfo/postgis-users>
>>
>
> ______________________________**_________________
> postgis-users mailing list
> postgis-users at postgis.**refractions.net<postgis-users at postgis.refractions.net>
> http://postgis.refractions.**net/mailman/listinfo/postgis-**users<http://postgis.refractions.net/mailman/listinfo/postgis-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110629/2d84d3cc/attachment.html>


More information about the postgis-users mailing list