Re: How do I change the server encoding? SOLVED

Поиск
Список
Период
Сортировка
Искать

Re: How do I change the server encoding? SOLVED

От:
Joseph Shraibman <jks@selectacast.net>
Дата:
Joseph Shraibman wrote:
> Joseph Shraibman wrote:
> After further experimenting I think the problem is in psql.  When I try
> update mytable set firstname = 'Oné' where ukey =  12911;
> 
> It works with a latin1 database, but when I try it on a unicode database:
> 
> utfowl=# update mytable set firstname = 'Oné' where ukey =  12911;
> utfowl'#
> 
> It thinks there is an open quote or something.  This is even if I set 
> the client encoding to be latin1.  Of course dumps are read with the 
> copy command but maybe it is the same problem.
> 
I solved the problem.  "set client_encoding = 'latin1';" does not work, but "\encoding 
latin1" does.  I suggest that pg_dump put a  "\encoding " after every \connect 
in the dump.  I would do this myself but I can't figure out where that is done in the dump 
program.

I did modify pg_dump.c so the encoding used during the dump can be specified on the 
command line, but since that isn't what solved the problem I'm not sure there is a point 
to having it.  Is anyone interested?

FAQ