Re: Locale/encoding problem/question - Mailing list pgsql-general

From henka@cityweb.co.za
Subject Re: Locale/encoding problem/question
Date
Msg-id 63482.196.23.181.69.1154687588.squirrel@support.metroweb.co.za
Whole thread Raw
In response to Re: Locale/encoding problem/question  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Locale/encoding problem/question
List pgsql-general

> On Fri, Aug 04, 2006 at 11:58:22AM +0200, henka@cityweb.co.za wrote:
>> > On Fri, Aug 04, 2006 at 10:48:17AM +0200, henka@cityweb.co.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).




pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Locale/encoding problem/question
Next
From: Tom Lane
Date:
Subject: Re: Locale/encoding problem/question