Re: proper ordering of a UNICODE / Hebrew postgres database cluster - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: proper ordering of a UNICODE / Hebrew postgres database cluster
Date
Msg-id 20020131140116G.t-ishii@sra.co.jp
Whole thread Raw
List pgsql-hackers
> This is probably a pretty stupid thing we are missing but we cant get hebrew to collate properly in PG7.1
> 
> We are running PG7.1 on RH6.2 with ACS 3.2/AOLServer 
> 
> we set LC_COLLATE and LC_CTYPE to iw_IL.UTF-8 as the system locale. (We want to support hebrew)
> 
> we then ran INITDB, createdb -E UNICODE  and started entering data.
> 
> However - the hebrew data collates randomly on a SELECT ....ORDER by....
> statement. FWIW - it seems to collate strings of a single character properly
> 
> Is this a bug in PG7.1? 
> what do we need to do to setup the db cluster properly so that the ORDER will collate the unicode words properly?

Have you enabled the locale support (--enable-locale)? If you enable
it, and still see the problem, then there might be problems with the
locale database. Can you run a small program something like following?

#include <string.h>
#include <locale.h>
main()
{ static char *s1 = "utf_8_hebrew_string_here"; static char *s2 = "another_utf_8_hebrew_string_here";";
 setlocale(LC_ALL,"");
 printf("%d\n",strcoll(s2,s1));
}



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Kerberos and fe-auth...
Next
From: Sean Chittenden
Date:
Subject: Re: Kerberos and fe-auth...