Re: Unicode problem ???

From: "Stijn Vanroye" <s(dot)vanroye(at)farcourier(dot)com>
To: "Karsten Hilbert" <Karsten(dot)Hilbert(at)gmx(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unicode problem ???
Date: 2004-04-22 07:48:15
Message-ID: 71E201BE5E881C46811BA160694C5FCB046729@fs1000.farcourier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > What I personally don't understand is: if all my databases
> > are UNICODE, why do I have to set the Client encoding to latin1
> > to get a correct result?

Karsten Hilbert wrote:
> Because LATIN1 isn't just a subset of UNICODE. If the data
> coming out of the database *is* UNICODE *and* your client
> *does* handle UNICODE directly you might get away with not
> setting a client_encoding, same goes for DB=latin1 +
> client=latin1. If, however, the DB delivers UNICODE but your
> client really wants LATIN1 you need to tell the database to
> convert the stored UNICODE to LATIN1 before delivery. That's
> what the client_encoding is for.
>
> Or so is my understanding of it.
>
> Karsten

Thanks, that's a pretty clear explication.
Only one question:
Wouldn't it be better if I just set my client encoding to UNICODE in stead of LATIN1? I suppose the UNICODE encoding set is understood by windows (and delphi), since I write progs for a win enviroment.

Stijn.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2004-04-22 08:29:28 Re: Unicode problem ???
Previous Message Priem, Alexander 2004-04-22 07:37:10 Re: Unicode problem ???