[postgis-users] problem with pgsql2shp and special characters/umlaute

gis at eifelgeist.com gis at eifelgeist.com
Fri Jul 7 06:48:47 PDT 2006


Hello Steffen,

thank you for help...

Could you tell me how to use the PGCLIENTENCODING if I call pgsql2shp from the prompt or vb.net.

I have no idea!

Regards,
Kathrin
	

Hello Kathrin,

> Savièse = Savièse
> Unterbäch = Unterbäch
> Grône = Grône
> Bürchen = Bürchen

> I use PostgeSQL 8.1.3 with POSTGIS 1.0.4 and GEOS 2.1.4.
> The encoding of the database is SQL-ASCII.

>
> Is it the right encoding of database?

Maybe not.
If you look at the ASCII table:

http://en.wikipedia.org/wiki/ASCII

There are no "Umlaute" or accents.

You may want to try ISO 8859-1 (aka LATIN1 in PostgreSQL).

I created a database with LATIN1 encoding, wrote some äs to it,
dumped a DBF using pgsql2shp and was able to see them using OpenOffice.

On the PostgreSQL level, you could simply use UTF-8 to store
all characters without problems, however
most Shapefile-reading software packages that I know don't like
UTF-8 in shapefiles.

I usually use UTF-8 on the database and then use the
PGCLIENTENCODING environment variable to create shapefiles
in the proper encoding.

Make sure that the software you use to look at the DBFs is using
the right encoding (OpenOffice asks you for the encoding to use
when opening DBFs).

Regards,

Steffen
_______________________________________________
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