How strings are sorted by LC_COLLATE specifically?

Started by Chang Chaoover 15 years ago3 messageshackers
Jump to latest
#1Chang Chao
charleschung.cn@gmail.com

Hello Dear All.

How strings are sorted when LC_COLLATE = ja_JP.UTF-8.
I tried to read the documention on that,but there are just a few words,
like LC_COLLATE determines string sort order,
Is there a specific reference about this?
So I can implement an equivalent string sort function in JAVA.
because some of the sort logic is here.
Any clue will be greatly appreciated.

Charles

#2Robert Haas
robertmhaas@gmail.com
In reply to: Chang Chao (#1)
Re: [COMMITTERS] How strings are sorted by LC_COLLATE specifically?

On Thu, Nov 25, 2010 at 1:40 AM, Chang Chao <charleschung.cn@gmail.com> wrote:

How strings are sorted when LC_COLLATE = ja_JP.UTF-8.
I tried to read the documention on that,but there are just a few words,
like LC_COLLATE determines string sort order,
Is there a specific reference about this?
So I can implement an equivalent string sort function in JAVA.
because some of the sort logic is here.
Any clue will be greatly appreciated.

As far as I know, we just inherit whatever behavior the operating
system has for that collation.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#3Chang Chao
charleschung.cn@gmail.com
In reply to: Robert Haas (#2)
Re: [COMMITTERS] How strings are sorted by LC_COLLATE specifically?

Hi,Robert.
Thanks for your reply.

As far as I looked into postgre's source,
I came to know that It seems that it uses strcoll to compare strings.
So it depends on the underlying operating system,like you said.

Charles.