Re: How do I change the server encoding?

From: Philippe Kiener <philippe(dot)kiener(at)eivd(dot)ch>
To: Antti Haapala <antti(dot)haapala(at)iki(dot)fi>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I change the server encoding?
Date: 2003-02-25 15:13:06
Message-ID: BA814692.54AC%philippe.kiener@eivd.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hello
I have the same question that Joseph Shraibman.
I have dump the db, created a new db with utf-8 encoding

My database should be transform from SQL_ASCII to utf-8

I have added that line to my dumps:

SET CLIENT_ENCODING TO 'SQL_ASCII';

Now when I load the dump into my db, I get that error on tables with text:

psql:tcom-database.sql:7111: ERROR: copy: line 1, Invalid UNICODE character
sequence found (0xe96500)
psql:tcom-database.sql:7111: lost synchronization with server, resetting
connection
psql:tcom-database.sql:7409: ERROR: copy: line 1, Invalid UNICODE character
sequence found (0xe97265)
psql:tcom-database.sql:7409: lost synchronization with server, resetting
connection
psql:tcom-database.sql:7456: ERROR: copy: line 3, Invalid UNICODE character
sequence found (0xe90007)
psql:tcom-database.sql:7456: lost synchronization with server, resetting
connection
psql:tcom-database.sql:7468: ERROR: copy: line 6, Invalid UNICODE character
sequence found (0xe97300)

Any ideas?

Thanks for your help.

Philippe Kiener

Le 25.2.2003 8:55, "Antti Haapala" <antti(dot)haapala(at)iki(dot)fi> wrote:

>
> On Mon, 24 Feb 2003, Joseph Shraibman wrote:
>
>> I have a server that has LATIN1 encoding. I want to convert it to run UTF
>> encoding. How
>> do I do that? Simply changing the encoding in a dump file does not work.

>
> So have you done both of these:
> - dropped and recreated your db with encoding 'utf-8'
> - converted your dumps to utf-8 or
> added set client_encoding to 'latin1' in the dumps

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-25 15:17:15 Re: Join query crashes 7.3.1 backend...
Previous Message Kolus Maximiliano 2003-02-25 15:09:21 Re: how do i avoid multiple sessions from inserting the

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeroen T. Vermeulen 2003-02-25 15:13:09 Re: I cant find it or I'm just lazy ?
Previous Message Andrew Sullivan 2003-02-25 13:29:38 Re: ILIKE