Re: Unicode vs SQL_ASCII DBs

From: Kris Jurka <books(at)ejurka(dot)com>
To: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unicode vs SQL_ASCII DBs
Date: 2004-02-02 10:27:43
Message-ID: Pine.LNX.4.33.0402020514070.22628-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2 Feb 2004, John Sidney-Woollett wrote:

> Kris, thanks for you feedback. Can you give me any further info on the
> questions below?
>
> Kris Jurka said:
> >> 3) If I want accented characters to sort correctly, must I select
> >> UNICODE
> >> (or the appropriate ISO 8859 char set) over SQL_ASCII?
> >
> > You are confusing encoding with locale. Locales determines the correct
> > sort order and you must choose an encoding that works with your locale.
>
> Except that in my test, the two differently encoded databases were in the
> same 7.4.1 cluster with the same locale, yet they sorted the *same* data
> differently - implying the encoding is a factor.

Right, note the "and you must choose an encoding that works with your
locale." clause. A SQL_ASCII encoding and a UTF-8 locale don't work.

> I basically need "english" sorting, and accented character support without
> any JDBC access/conversion problems. Do you think that my current DB
> locale (en_GB.UTF-8) and UNICODE encoded database the best solution? Or
> can you suggest something better?

If you need "english" sorting like "en_GB" then that is the best option,
but if you just need regular sorting the C locale might be better. It is
sometimes confusing how en_US (I assume GB is similar) sorts strings with
spaces and punctuation and so on.

Kris Jurka

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Sidney-Woollett 2004-02-02 11:08:54 Re: Unicode vs SQL_ASCII DBs
Previous Message John Sidney-Woollett 2004-02-02 09:57:21 Re: Unicode vs SQL_ASCII DBs