Re: Locale/encoding problem/question

From: henka(at)cityweb(dot)co(dot)za
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Locale/encoding problem/question
Date: 2006-08-04 10:33:08
Message-ID: 63482.196.23.181.69.1154687588.squirrel@support.metroweb.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Fri, Aug 04, 2006 at 11:58:22AM +0200, henka(at)cityweb(dot)co(dot)za wrote:
>> > On Fri, Aug 04, 2006 at 10:48:17AM +0200, henka(at)cityweb(dot)co(dot)za wrote:
>> > Two big questions:
>> >
>> > 1. What encoding are the two database (\l will tell you)?
>> > 2. What encoding are the clients expecting?
>
>> I've even tried using LATIN1 (ie, explicitly setting it to latin1 using
>> initdb, and then restoring the database after changing the 'utf-8'
>> strings
>> in the dump data to 'latin1'). This still yields the funny chars.
>
> Wait, so the dump is in utf-8? You shouldn't need to edit the dump,
> postgresql will convert the encodings on the fly while loading.

I've actually found two versions - one with UTF-8, and the other LATIN1.

>> To be honest, I have no idea what the origional encoding was.
>
> It should be in the dump file, almost the first line. Locale is of no
> interest to pg_dump, you'll have to decide how you want it.

Yes: UTF-8 and the other is LATIN1

> Well, at the very least, does it go away if you type:
>
> set client_encoding=latin1;

No it doesn't. That was one of the first things I tried after reading the
docs.

> Please provide more details about your setup too, your client is on
> windows? The server is ...?

Server:
Linux debian sarge
PG: 8.1.4
show all:
lc_collate C
lc_ctype C
lc_messages C
lc_monetary C
lc_numeric C
lc_time C
client_encoding LATIN1 (or UTF-8)

Clients:
Windows using PuTTY (ie, for psql), and dynamic web content with PHP/Pg
(on any browser).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Q Beukes 2006-08-04 12:33:24 pg_dump sequence problem
Previous Message henka 2006-08-04 09:58:22 Re: Locale/encoding problem/question