Search Postgresql Archives

Re: Locale/encoding problem/question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux