pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Florian Helmberger <fh@25th-floor.com>
To: pgsql-admin@postgresql.org
Cc: mandana.mokhtary@wspgroup.se
Subject: Re: Encoding Problem
Date: Mon, 12 Sep 2011 13:55:12 +0200
Message-ID: <4E6DF320.9040908@25th-floor.com> (raw)
In-Reply-To: <6C75D80E19AC6A4FBEB7C7EAE9D654330218A7C3@EXC02COL1SE.se.wspgroup.com>
References: <6C75D80E19AC6A4FBEB7C7EAE9D654330218A7C3@EXC02COL1SE.se.wspgroup.com>

On 12.09.11 13:38, Mokhtary, Mandana wrote:

> I am trying to load shapfiles into the postgreSQL9.0. The database
> encoding is UTF8.
>
> My shapfiles coming from Sweden, so there are some Swedish alphabet in
> the fields name and also inside columns data.
>
> I used this command to load shapfiles:
>
> C:\Pragram Files\PostgreSQL\9.0> shp2pgsql -s 2400 –c –W LATIN1
> C:/project/Mandana/OBO/WSPbackground_shp/Primärkartan.shp |psql –U
> postgres OBO
>
> I could insert shapfiles which do not have Swedish alphabet in their
> fields name or data inside the columns, but I could not load others that
> have Swedish alphabet.
>
> I get this ERROR:
>
> *invalid byte sequence for encoding “UTF8”:0xe4726b*
>
> Any help would be so appreciated.

Hi!

You might need to set the CLIENT_ENCODING to latin1.

http://www.postgresql.org/docs/9.0/static/multibyte.html

Regards,
Florian

-- 

Florian Helmberger --------------------

25th-floor - Operating Custom Solutions
de Pretis & Helmberger KG

Seidengasse 33-35/Top 19
1070 Wien, Austria

Mail: fh@25th-floor.com
Web : http://www.25th-floor.com
Tel.: +43 1 / 512 82 89 - 60
Fax : +43 1 / 512 82 89 - 76
Mob.: +43 699 / 109 24 24 5
---------------------------------------



view thread (6+ messages)  latest in thread

Message-ID: <4E6DF320.9040908@25th-floor.com>
Permalink:  ../4E6DF320.9040908@25th-floor.com/
Also on:    postgresql.org/message-id/4E6DF320.9040908@25th-floor.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: fh@25th-floor.com, mandana.mokhtary@wspgroup.se
  Subject: Re: Encoding Problem
  In-Reply-To: <4E6DF320.9040908@25th-floor.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox