Re: Questions about encoding between two databases

From: Archibald Zimonyi <arsi(at)aranzo(dot)netg(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Questions about encoding between two databases
Date: 2009-08-21 18:46:45
Message-ID: alpine.DEB.1.10.0908212041540.17606@szamitogep.zimonyi.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

> Archibald Zimonyi <arsi(at)aranzo(dot)netg(dot)se> writes:
>> I went into the generated dump file and (more wish then anything else)
>> tried to simply change the encoding from LATIN1 to UTF8 and then load the
>> file, it did not complain about incorrect encoding setting for the load,
>> however it complained that the characters did not match true UTF8
>> characters (which was almost what I guessed would happen).
>
> Indeed. Do *not* change the client_encoding setting in the dump file.
> You can edit the ENCODING options in the CREATE DATABASE commands
> though. (Didn't we explain this to you already?)
>
> regards, tom lane
>
Well, I did send this query with an incorrect email address so it got
stuck and was never posted properly, so I have not seen any such reply.
Can you please explain again?

The ENCODING options in the CREATE DATABASE commands, yet these commands
exist in the dump file. I don't understand.

But yes, after my change, the databases schemas were all created with UTF8
so that part worked, but of course the actual text which was LATIN1 before
failed for those character sets where UTF8 differs from LATIN1, so it
still fails.

I will try using iconv as suggested in another reply, but shouldn't that
then mean I need to change the client_encoding (so that it matches)?

Archie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Boyd, Craig 2009-08-21 18:48:26 Re: Schema diff tool?
Previous Message David Kerr 2009-08-21 18:43:49 Schema diff tool?