Re: How do I change the server encoding? SOLVED
От | Joseph Shraibman |
---|---|
Тема | Re: How do I change the server encoding? SOLVED |
Дата | |
Msg-id | 3E5D3B86.3000105@selectacast.net обсуждение исходный текст |
Ответ на | Re: How do I change the server encoding? (Joseph Shraibman <jks@selectacast.net>) |
Список | pgsql-general |
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 <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?
В списке pgsql-general по дате отправления: