X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 092DB52863 for ; Wed, 25 May 2005 17:00:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90519-09 for ; Wed, 25 May 2005 19:59:57 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 40EA852845 for ; Wed, 25 May 2005 16:59:56 -0300 (ADT) Received: (qmail 10677 invoked by uid 1112); 25 May 2005 19:59:58 -0000 Date: Wed, 25 May 2005 14:59:58 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Giuseppe Sacco Cc: "pgsql-jdbc@postgresql.org" Subject: Re: DatabaseMetaData.getExtraNameCharacters In-Reply-To: <1117047088.27493.36.camel@localhost> Message-ID: References: <1117034023.27493.10.camel@localhost> <1117044622.27459.28.camel@localhost> <1117047088.27493.36.camel@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/111 X-Sequence-Number: 12942 On Wed, 25 May 2005, Giuseppe Sacco wrote: > Il giorno mer, 25-05-2005 alle 13:25 -0500, Kris Jurka ha scritto: > [...] > > ident_start [A-Za-z\200-\377_] > > ident_cont [A-Za-z\200-\377_0-9\$] > > identifier {ident_start}{ident_cont}* > > > > So \200-\377 is octal for any character with the high bit set. The list > > of what characters this could map to numbers in the tens of thousands for > > unicode, so it's not really feasibly to return in this method. > > if I understand correclty, the valid charset is the one computed by the > attached class. It seems to me that this is 191 characters long. > Could you please let me know where I am wrong? You are assuming that each character is only one byte. The backend lexing rules are a byte by byte operation, but the JDBC side is returning a String of characters. Consider the character "Latin Small Letter s with Acute" (\u015B) gets encoded in UTF-8 as C5 9B or \305\233 in octal. This is one character in the result of getExtraNameCharacters. Kris Jurka