Re: accented characters migraine

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: "Wright, George" <George(dot)Wright(at)infimatic(dot)com>
Cc: John Gunther <postgresql(at)bucksvsbytes(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: accented characters migraine
Date: 2007-10-12 16:45:17
Message-ID: 1192207517.10677.117.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)lfix(dot)co(dot)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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2007-10-12 16:48:35 Re: accented characters migraine
Previous Message Wright, George 2007-10-12 16:19:51 Re: accented characters migraine