Re: compare lower case and upper case when encoding is utf-8 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: compare lower case and upper case when encoding is utf-8
Date
Msg-id 1339974796.18469.3.camel@vanquo.pezone.net
Whole thread Raw
In response to compare lower case and upper case when encoding is utf-8  (Quan Zongliang <quanzongliang@gmail.com>)
Responses Re: compare lower case and upper case when encoding is utf-8  (Quan Zongliang <quanzongliang@gmail.com>)
List pgsql-hackers
On lör, 2012-06-16 at 16:21 +0800, Quan Zongliang wrote:
> I found that lower case is less than upper case when the db is
> created 
> with utf8.
> I tried below
>      locale   en_US.utf8   'A'<'a'     false
>      locale   ja_JP.utf8   'A'<'a'     true
>      locale   zh_CN.utf8   'A'<'a'     false
> Under Windows
>      locale   Chinese_China   'A'<'a'     false
> 
> I am not sure it is normal or not.
> But in Chinese, the lower case should be greater than upper, same as 
> locale C.

The operating system locale determines that, so you need to look there
if you don't agree with the result.

http://wiki.postgresql.org/wiki/FAQ#Why_do_my_strings_sort_incorrectly.3F



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Testing 9.2 in ~production environment
Next
From: Peter Geoghegan
Date:
Subject: Re: sortsupport for text