[postgis-users] Client encoding error

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu Aug 16 04:14:22 PDT 2007


> PostGIS is in UTF-8, the table is in WindowsLatin1. How do I change the
> encoding? Is it just a matter of editting the tab file and changing the
> string WindowsLatin1 with UTF-8?


Hi Milo,

If your database is in UTF8 encoding then you can try to get PostgreSQL to
do the conversion for you. A useful tip is that you can configure the
default client encoding for a particular database user, e.g. in the case
of user foo:

ALTER USER foo SET client_encoding to LATIN1;

Then re-connect to the database as foo to reload your data. Don't forget
to swap the encoding back when you're done ;)


HTH,

Mark.





More information about the postgis-users mailing list