Re: utf-8 and cultural sensitive sorting

From: Alex Stapleton <alexs(at)advfn(dot)com>
To: <sknipe(at)tucows(dot)com> <sknipe(at)tucows(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: utf-8 and cultural sensitive sorting
Date: 2005-07-12 15:21:54
Message-ID: D0EEABC7-E3BF-45D6-BF02-341CAC1DE632@advfn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It depends what language you want to sort. Lots of languages do not
have a sort alphabet. For example, Japanese. It can be quite
difficult to sort unusual languages like this. I am not aware of any
standard technique for sorting Japanese text other than keeping an
arbitrarily sorted dictionary (courtesy of whatever the most popular
Japanese dictionary at the time happens to be perhaps) and then doing
hash lookups in the for indexing values. As you can imagine, this is
not particularly fast. I have not actually tried this, but I expect
PosgreSQL will simply sort in a fairly binary fashion. As in, it gets
sorted in according to the binary value of the characters, or the
UTF-8 offsets, or something like that.

On 12 Jul 2005, at 15:48, <sknipe(at)tucows(dot)com> <sknipe(at)tucows(dot)com> wrote:

> Our product will be storing its character data in utf-8 format
> (unicode encoding).
>
> What is the best way to achive cultural sensitive sorting using the
> utf-8 data?
>
> Is it possible have the locale apply to a connection?
>
> If so, is the cultural sorting support mature in PostgreSQL?
>
> What type of performance can be expected as compared with the
> normal c locale sorting?
>
> Thanks very much,
>
> Steve.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that
> your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roman Neuhauser 2005-07-12 15:35:35 Re: Update more than one table
Previous Message Richard Huxton 2005-07-12 15:10:03 Re: utf-8 and cultural sensitive sorting