[postgis-users] Illegal Byte Sequence

Andreas Forø Tollefsen andreasft at gmail.com
Mon Mar 14 03:11:49 PDT 2011


The error:
Importing shapefile (1267 records)...
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
http://www.postgresql.org/docs/current/static/multibyte.html.

Shapefile import failed.


2011/3/14 Andreas Forø Tollefsen <andreasft at gmail.com>

> Hi,
>
> I am trying to import this shapefile into a database on my new server:
>
> http://sedac.ciesin.columbia.edu/povmap/downloads/ds_global/imr_shapefile.zip
>
> While this was no problem on my old server running Windows Vista, i now
> have problems on my Ubuntu Server.
> 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.
> I tried creating a new database on the new server with blank COLLATE and
> CTYPE, but it would not accept blank.
>
> Any ideas?
>
> Thanks,
> Andreas
>
> The old database had the following settings on Enconding:
> CREATE DATABASE newpg
>   WITH OWNER = -----
>        ENCODING = 'UTF8'
>        TABLESPACE = pg_default
>        LC_COLLATE = ''
>        LC_CTYPE = ''
>        CONNECTION LIMIT = -1;
>
> The database on the new server has the following:
> CREATE DATABASE priogrid
>   WITH OWNER = -----
>        ENCODING = 'UTF8'
>        TABLESPACE = pg_default
>        LC_COLLATE = 'en_US.UTF-8'
>        LC_CTYPE = 'en_US.UTF-8'
>        CONNECTION LIMIT = -1;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110314/5f844ad8/attachment.html>


More information about the postgis-users mailing list