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

From Martijn van Oosterhout
Subject Re: Locale/encoding problem/question
Date
Msg-id 20060804090117.GE2478@svana.org
Whole thread Raw
In response to Locale/encoding problem/question  (henka@cityweb.co.za)
Responses Re: Locale/encoding problem/question  (henka@cityweb.co.za)
List pgsql-general
On Fri, Aug 04, 2006 at 10:48:17AM +0200, henka@cityweb.co.za wrote:
> Hello all,
>
> I somehow managed to stuff up the encoding (or locale or something) in a
> transfer of a database from one machine to another (also different linux
> distribution).
>
> The problem is this:  the origional database was created and populated
> with data using whatever default locale/encoding was installed on the
> first machine.

Two big questions:

1. What encoding are the two database (\l will tell you)?
2. What encoding are the clients expecting?

It is entirely possible that the databases have got the right encoding,
but the client you're accessing it doesn't understand. For example, if
you've got both your databases on UTF-8, then the transfer went fine,
but perhaps the client on the new machine doesn't display UTF-8.

This happens because psql and other clients default to the same
encoding as the server and don't check to see if the terminal actually
supports that. So what you're decribing could also be a result of the
server sending you UTF-8, the client displaying that, but the xterm or
whatever you're using thinking it's Latin1.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: LISTEN considered dangerous
Next
From: Flemming Frandsen
Date:
Subject: Re: LISTEN considered dangerous