Skip site navigation (1) Skip section navigation (2)

Re: Locale / Encoding mismatch

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Naz Gassiep <naz(at)mira(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Locale / Encoding mismatch
Date: 2008-03-30 18:01:58
Message-ID: 20080330180158.GA24970@svana.org (view raw or flat)
Thread:
Lists: pgsql-general
On Mon, Mar 31, 2008 at 04:32:16AM +1100, Naz Gassiep wrote:
> I have never bothered with the server's locale, all the locale handling 
> in the app gets handled within the DB itself. I guess I now have to dig 
> into the murky world of system locales and how they affect my app 
> ecosystem. I don't suppose there is an easy solution to this and a short 
> explanation of why it now occurs is there?

Basically, your locale defines your sort order and the encoding and the
locale you've chosen in incompatable with the encoding you want to use
in the backend. Having differing ideas of the encoding causing sorting
to fail in odd ways and in extreme cases, crashes.

Short answer is: use en_AU.UTF-8 for your locale.  If it doesn't exist
you can create it using /etc/locale.gen (assuming you're running some
kind of linux)

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog(at)svana(dot)org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

pgsql-general by date

Next:From: Zdenek KotalaDate: 2008-03-30 18:03:58
Subject: Re: Locale / Encoding mismatch
Previous:From: Naz GassiepDate: 2008-03-30 17:32:16
Subject: Locale / Encoding mismatch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group