Re: accented characters migraine

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: accented characters migraine
Дата
Msg-id 1192207517.10677.117.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re: accented characters migraine  ("Wright, George" <George.Wright@infimatic.com>)
Список pgsql-novice
On Fri, 2007-10-12 at 11:19 -0500, Wright, George wrote:
> Putty is showing ISO-8858-1 which is Latin. I believe both client and
> server must be UTF-8.
>
>
>
> -----Original Message-----
> ENVIRONMENT:
> Terminal program: putty.exe, Translation: ISO-8859-1:1998 (Latin-1, West
> Europe)
> pg settings:
> client_encoding: UTF8
> lc_collate: en_US.UTF-8
> lc_ctype: en_US.UTF-8
> server_encoding UTF8
>
> initdb defaulted to UTF-8, which I need because I want ORDER BY to sort
> alphabetically, not by hex code.

I think you need to set your client encoding to Latin.  At the moment it
thinks the client encoding is Unicode but you are feeding it Latin
characters.

The command you need is:

  set client_encoding to 'latin1';

Alternatively, set putty to output UTF-8, if it can do that.

Sorting is done by the backend, and the database is UTF-8, so you don't
need to change anything there.

--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
   Do you want to know God?   http://www.lfix.co.uk/knowing_god.html


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Brett Maton"
Дата:
Сообщение: Re: Problem with PG_GETARG_CSTRING
Следующее
От: John Gunther
Дата:
Сообщение: accented characters migraine