Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id A1823475C6F for ; Sun, 19 May 2002 14:08:26 -0400 (EDT) Received: from www1.translationforge.com (unknown [212.11.36.58]) by postgresql.org (Postfix) with ESMTP id BD615475C32 for ; Sun, 19 May 2002 14:08:24 -0400 (EDT) Received: from linus.translationforge.com ([192.168.1.102]) by www1.translationforge.com (8.12.1/8.12.1) with ESMTP id g4JI8Tst025253; Sun, 19 May 2002 20:08:30 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Jean-Michel POURE Reply-To: jm.poure@freesurf.fr To: Patrice =?iso-8859-1?q?H=E9d=E9?= , pgsql-general@postgresql.org Subject: Re: [HACKERS] UTF-8 safe ascii() function Date: Sun, 19 May 2002 20:08:18 +0200 X-Mailer: KMail [version 1.4] References: <200205181853.19420.jm.poure@freesurf.fr> <20020519114413.2265b70e.phede-ml@islande.org> In-Reply-To: <20020519114413.2265b70e.phede-ml@islande.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200205192008.18893.jm.poure@freesurf.fr> X-Archive-Number: 200205/663 X-Sequence-Number: 24643 Le Dimanche 19 Mai 2002 11:44, Patrice H=E9d=E9 a =E9crit : > The function is taking the first character of a TEXT element, and > returns its UCS2 value. I just did some basic test (i.e. I have not > tried with 3 or 4 bytes UTF-8 chars). The function is following the > Unicode 3.2 spec. Hi Patrice, I tried a Japanese character : SELECT utf8toucs2 ('=E6=94=AF'::text) which returns -1 Do you know why it does not return the UCS-2 value? Cheers, Jean-Michel POURE