From krabuzin@foi.hr Fri May 7 11:50:50 2004 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 55231D1EDD7 for ; Fri, 7 May 2004 08:50:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 33306-06 for ; Fri, 7 May 2004 08:50:32 -0300 (ADT) Received: from barok.foi.hr (barok.foi.hr [161.53.120.3]) by svr1.postgresql.org (Postfix) with ESMTP id 7CA03D1E632 for ; Fri, 7 May 2004 08:50:27 -0300 (ADT) Received: from krabuzin (k177.prof.foi.hr [192.168.3.177]) by barok.foi.hr (8.12.10/8.12.10) with SMTP id i47BoRv0026241 for ; Fri, 7 May 2004 13:50:29 +0200 (MEST) Message-ID: <006101c43429$a7b24c40$b103a8c0@krabuzin> From: "Kornelije" To: Subject: SELECT - ORDER BY Croatian characters .... Date: Fri, 7 May 2004 13:51:32 +0200 Organization: FOI MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005E_01C4343A.67D730C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200405/72 X-Sequence-Number: 17786 This is a multi-part message in MIME format. ------=_NextPart_000_005E_01C4343A.67D730C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everybody, I'm using PostgreSQL and my database contains Croatian Characters (ccz...).= ... so when I pose a query, and I use order by clause, the result is not sorted= properly..... I was using once VB for aplications and there I've used a function which ch= anged Croatian characters with some equivalents and sorting order was ok; s= ince now I'm using PHP, is it feasible to write such a function or is there= a better solution? thanks Kornelije ------=_NextPart_000_005E_01C4343A.67D730C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi everybody,
 
I'm using PostgreSQL and my database conta= ins=20 Croatian Characters (čć=9E...)....
so when I pose a query, and I use order by= clause,=20 the result is not sorted properly.....
 
I was using once VB for aplications a= nd=20 there I've used a function which changed Croatian characters with some= =20 equivalents and sorting order was ok; since now I'm using PHP, is it= =20 feasible to write such a function or is there a better solution?
 
thanks
 
Kornelije
------=_NextPart_000_005E_01C4343A.67D730C0-- From peter_e@gmx.net Fri May 7 18:39:33 2004 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 18EC0D1EDEF for ; Fri, 7 May 2004 15:39:33 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 85806-07 for ; Fri, 7 May 2004 15:39:13 -0300 (ADT) Received: from curie.credativ.org (credativ.com [217.160.209.18]) by svr1.postgresql.org (Postfix) with ESMTP id 3F67CD1B4E6 for ; Fri, 7 May 2004 15:39:12 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by curie.credativ.org (Postfix) with ESMTP id 63C1355988; Fri, 7 May 2004 20:39:11 +0200 (CEST) Received: from colt.pezone.net (dsl-082-082-233-048.arcor-ip.net [82.82.233.48]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by curie.credativ.org (Postfix) with ESMTP id F1D9655986; Fri, 7 May 2004 20:39:10 +0200 (CEST) From: Peter Eisentraut To: "Kornelije" , Subject: Re: SELECT - ORDER BY Croatian characters .... Date: Fri, 7 May 2004 20:39:09 +0200 User-Agent: KMail/1.5.1 References: <006101c43429$a7b24c40$b103a8c0@krabuzin> In-Reply-To: <006101c43429$a7b24c40$b103a8c0@krabuzin> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200405072039.09952.peter_e@gmx.net> X-Virus-Scanned: by AMaViS at credativ.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/75 X-Sequence-Number: 17789 Kornelije wrote: > I'm using PostgreSQL and my database contains Croatian Characters > (ccz...).... so when I pose a query, and I use order by clause, the > result is not sorted properly..... You need to initdb your database with the proper locale (hr_HR, probably). Also, choose the right encoding to go along with the locale (LATIN2?). From krabuzin@foi.hr Sat May 8 09:55:17 2004 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3597FD1DB5C for ; Sat, 8 May 2004 06:55:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 33947-02 for ; Sat, 8 May 2004 06:54:58 -0300 (ADT) Received: from barok.foi.hr (barok.foi.hr [161.53.120.3]) by svr1.postgresql.org (Postfix) with ESMTP id 54BE2D1F6BD for ; Sat, 8 May 2004 06:54:55 -0300 (ADT) Received: from barok.foi.hr (krabuzin@localhost [127.0.0.1]) by barok.foi.hr (8.12.10/8.12.10) with ESMTP id i489suWQ007523; Sat, 8 May 2004 11:54:56 +0200 (MEST) Received: from localhost (krabuzin@localhost) by barok.foi.hr (8.12.10/8.12.2/Submit) with ESMTP id i489srte007520; Sat, 8 May 2004 11:54:53 +0200 (MEST) Date: Sat, 8 May 2004 11:54:53 +0200 (MEST) From: Kornelije Rabuzin To: Peter Eisentraut Cc: pgsql-sql@postgresql.org Subject: Re: SELECT - ORDER BY Croatian characters .... In-Reply-To: <200405072039.09952.peter_e@gmx.net> Message-ID: References: <006101c43429$a7b24c40$b103a8c0@krabuzin> <200405072039.09952.peter_e@gmx.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/88 X-Sequence-Number: 17802 Thanks, but the problem is that I'm not using this database alone and there exist also some other users; so I've found this locale setings (lc_collate), but this cannot be changed because some indexes will be probably damaged..... so database is not set up properly...... but I've started to work with this database and it cannot be changed .....so I've to found some other solution ...... so if you know if it's feasible to write some function...... thank you very much ;-) Kornelije On Fri, 7 May 2004, Peter Eisentraut wrote: > Kornelije wrote: > > I'm using PostgreSQL and my database contains Croatian Characters > > (ccz...).... so when I pose a query, and I use order by clause, the > > result is not sorted properly..... > > You need to initdb your database with the proper locale (hr_HR, > probably). Also, choose the right encoding to go along with the locale > (LATIN2?). > >