[postgis-users] problem with apostrophe
TECHER David
davidtecher at yahoo.fr
Mon Jan 15 14:04:36 PST 2007
Andreas Neumann a écrit :
> [cut]
>
> Do you have an idea how I can find out what encoding my shapefile
> uses? In the Postgis DB I use UTF-8, but my shapefile doesn't seem to
> use UTF-8. At least it fails if I use UTF-8 as an encoding during
> conversion process. I have no idea how to find out what encoding the
> shapefile uses. I used ISO-8859-1 during conversion. It seems to work
> fine, but it is just a guess encoding that I use now.
>
> Thanks,
> Andreas
>
Hi Andreas
With all french shapefile I'm used to importing in PostGIS, the
shapefile are in LATIN1 or LATIN9
Since U are in GNU/Linux U can use iconv or recode
shp2pgsql -DI [shapefile] [table] | iconv -f LATIN1 -t UTF-8 -c | psql [database]
shp2pgsql -DI [shapefile] [table] | recode l9..u8 | psql [database] (with l9 as LATIN9 and u8 as UTF-8)
Since U understand French have a look on my blog at
for iconv:
http://www.davidgis.fr/blog/index.php?2006/11/24/83-importer-un-shapefile-francais-dans-une-base-encodee-en-utf-8
(for iconv)
for recode
http://www.davidgis.fr/blog/index.php?2006/12/09/97-autre-astuce-pour-passer-d-un-shapefile-a-une-base-de-donnees-encode-en-utf-8
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com
More information about the postgis-users
mailing list