Re: Encoding - Mailing list pgsql-general

From Tom Lane
Subject Re: Encoding
Date
Msg-id 2753.974219578@sss.pgh.pa.us
Whole thread Raw
In response to Encoding  ("Anders R. Sveen" <anderssv@stud.ntnu.no>)
List pgsql-general
"Anders R. Sveen" <anderssv@stud.ntnu.no> writes:
> I'm building a database containing ranges of characters. That means i'm
> supposed to check if t.ex. 'Sveen' is between 'Sv' and 'R'. This works ok
> for non norwegian characters, but when these show up the results are
> wrong. (� � � if anyone can see them)

Offhand I think you need a suitable LOCALE setting, not an encoding.
The encoding stuff is for multibyte character sets --- which is mostly
Asian languages, not European.  For Norwegian you don't need 16-bit
characters, you just need to set the collation order of 8-bit chars.

BTW: one thing to beware of when using LOCALE is that you've gotta be
careful to start the postmaster with the same LOCALE environment
variables every time for a given database.  Otherwise, the
LOCALE-dependent sort order of your indexes gets messed up, and things
start to behave very strangely ...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Multiple Inheritance
Next
From: Tom Lane
Date:
Subject: Re: Error with Vaccum Analyze !?