Re: ascii to utf-8

From: Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no>
To: Tom Hart <tomhart(at)coopfed(dot)org>
Cc: Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: ascii to utf-8
Date: 2008-01-23 20:55:39
Message-ID: 4797A9CB.9060201@usit.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Hart wrote:
> Hello everybody. I hope your week's going well so far.
>
> I built our data mine in postgreSQL around 3 months ago and I've been
> working with it since. Postgres is great and I'm really enjoying it,
> but I've hit a bit of a hitch. Originally (and against pgAdmin's good
> advice, duh!) I set up the database to use ASCII encoding. However we
> have a large base of Spanish speaking members and services, and we
> need utf-8
...snip snip
>
> pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence
> for encoding "UTF8": 0xc52f
> HINT: This error can also happen if the byte sequence does not match
> the encoding expected by the server, which is controlled by
> "client_encoding".
> CONTEXT: COPY transaction, line 209487
> WARNING: errors ignored on restore: 1
>

Try editing your dump-file and change the line which reads "SET
client_encoding = 'SQL_ASCII';" to "SET client_encoding = 'LATIN1';"

--
Tommy Gildseth

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2008-01-23 21:34:31 Re: Best practices for protect applications agains Sql injection.
Previous Message brian 2008-01-23 20:45:04 Re: Best practices for protect applications agains Sql injection.