Обсуждение: encoding shp2pgsql/ client encoding

Поиск
Список
Период
Сортировка

encoding shp2pgsql/ client encoding

От
Melanie Hofmann
Дата:
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.

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

Re: encoding shp2pgsql/ client encoding

От
Brian Modra
Дата:
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/

Re: encoding shp2pgsql/ client encoding

От
Mark Guadalupe
Дата:


On Fri, Nov 27, 2009 at 3:45 AM, Brian Modra <epailty@googlemail.com> wrote:
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';

Or try 'ASCII' if 'LATIN1' doesn't work.
 

> 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/

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



-- 
Cheers,
Mark Guadalupe

Mobile: +64 21 973 677
Skype: markguadalupe
ICQ: 162553538
Yahoo ID: mak1e
Twitter: mak1e
http://is.gd/kajL

The information in this email and any attachments is confidential. This information may be subject to legal, professional, or other privilege. It must not be disclosed to any person without our authority. If you are not the intended recipient you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. Please return this message to the sender immediately and delete any and all copies from your system.