Re: sorting chinese characters - Mailing list pgsql-sql

From Ian Barwick
Subject Re: sorting chinese characters
Date
Msg-id 200304260852.29428.barwick@gmx.net
Whole thread Raw
In response to sorting chinese characters  ("prabahar" <prabahar@questech.co.in>)
List pgsql-sql
On Saturday 26 April 2003 03:55, prabahar wrote:
> Thanks for your reply, Let me explain a bit more about my problem. I have a
> member master table where in i have member_name_hiragana,
> member_name_chinese [member_name_hiragana has member names in hiragana
> chars and
> member_name_chinese has member names in chinese chars].
> when i execute the query "select * from member_master orderby
> member_name_hiragana" then the sort it a proper sort order. But when i
> execute "select * from member_master orderby member_name_chinese" then it
> does not sort properly. I am not sure about the sort order, but my clients
> say that that is not a proper sort. How can i fix this?

This sounds like "member_name_hiragana" is the sort key you need so I would
stick to this unless you have some specific requirement to sort by Chinese
character, which is unusual and as I said non-trivial. It might be worth using
"member_name_chinese" as a secondary sort key to produce reproducible
results in those cases where "member_name_hiragana" are the same
but "member_name_chinese" are different; the JIS character sets contain
characters in a _crude_ order which may be useful for this case.


HTH

Ian Barwick
barwick@gmx.net



pgsql-sql by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: /* */ comments showing up in pg_stat_activity
Next
From: "A.Bhuvaneswaran"
Date:
Subject: Re: PL/PgSQL Question