X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0B36147580B for ; Sat, 26 Apr 2003 02:53:25 -0400 (EDT) Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by postgresql.org (Postfix) with ESMTP id E3915474E42 for ; Sat, 26 Apr 2003 02:53:23 -0400 (EDT) Received: from iwate.ianb.homelinux.net (pD9517E73.dip.t-dialin.net [217.81.126.115]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h3Q6rLvx001046; Sat, 26 Apr 2003 08:53:22 +0200 (MEST) From: Ian Barwick To: "prabahar" , pgsql-sql@postgresql.org Subject: Re: sorting chinese characters Date: Sat, 26 Apr 2003 08:52:29 +0200 User-Agent: KMail/1.5.1 References: <20030425082222.M48563@questech.co.in> <200304252010.11373.barwick@gmx.net> <20030426015548.M3479@questech.co.in> In-Reply-To: <20030426015548.M3479@questech.co.in> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200304260852.29428.barwick@gmx.net> X-Spam-Status: No, hits=-37.2 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, RCVD_IN_NJABL,RCVD_IN_OSIRUSOFT_COM,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_KMAIL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/392 X-Sequence-Number: 13093 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