Re: encoding shp2pgsql/ client encoding - Mailing list pgsql-admin

From Brian Modra
Subject Re: encoding shp2pgsql/ client encoding
Date
Msg-id 5a9699850911260645x5b0c2721u22bfeceb5d7f1b34@mail.gmail.com
Whole thread Raw
In response to encoding shp2pgsql/ client encoding  (Melanie Hofmann <helpmisterx@googlemail.com>)
Responses Re: encoding shp2pgsql/ client encoding  (Mark Guadalupe <mark.guadalupe@gmail.com>)
List pgsql-admin
2009/11/26 Melanie Hofmann <helpmisterx@googlemail.com>:
> Hello,
>
> I'm a very big problem. I want to load shapefiles in a postgresql with
> shp2pgsql and psql. So i create the statement on a windows DOS console. I
> get below error FEHLER:  ungültige Byte-Sequenz für Kodierung UTF8 0xd627.
>
> My Client_encoding is
>
> template_postgis=# SHOW CLIENT_ENCODING;
>  client_encoding
> -----------------
>  UTF8
> (1 row)
>
> and my database encoding is also UTF8, only my shapefile is not in UTF8.

Melanie, I am posting this in the off-chance that it may help you. I
faced the same problem as you about 3 years ago, and have not thought
about it since. I put this at the top of the SQL file that I generate
for inserting into the database (other SQLs generated by shp2sql)

set client_encoding to 'LATIN1';

> I make a few trails to change the client encoding, but nothing realy works.
>
> What can I do?
> Can anybody help me?
>
> Thanks.
>
> Regards MisterX
>



--
Brian Modra   Land line: +27 23 5411 462
Mobile: +27 79 69 77 082
5 Jan Louw Str, Prince Albert, 6930
Postal: P.O. Box 2, Prince Albert 6930
South Africa
http://www.zwartberg.com/

pgsql-admin by date:

Previous
From: Melanie Hofmann
Date:
Subject: encoding shp2pgsql/ client encoding
Next
From: Jaime Casanova
Date:
Subject: Re: WAL file compatibility