X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1433BDA015 for ; Mon, 21 Nov 2005 15:12:10 -0400 (AST) 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 97700-09 for ; Mon, 21 Nov 2005 19:12:08 +0000 (GMT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by svr1.postgresql.org (Postfix) with ESMTP id 62F35D9566 for ; Mon, 21 Nov 2005 15:12:06 -0400 (AST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr4.postgresql.org (Postfix) with ESMTP id 2278F5AF85C for ; Mon, 21 Nov 2005 19:12:06 +0000 (GMT) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1EeH40-0007xK-8D for pgsql-odbc@postgresql.org; Mon, 21 Nov 2005 20:10:52 +0100 Received: from 83.145.96.114 ([83.145.96.114]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Nov 2005 20:10:52 +0100 Received: from Marc.Herbert by 83.145.96.114 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Nov 2005 20:10:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-odbc@postgresql.org From: Marc Herbert Subject: Re: Continuing encoding fun.... Date: Mon, 21 Nov 2005 18:19:15 +0100 Lines: 51 Message-ID: <87hda52a24.fsf@meije.emic.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 83.145.96.114 User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4 (Jumbo Shrimp, linux) Cancel-Lock: sha1:6MGGaaUYM51l8qsrg7qAnruFDMU= X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.253 required=5 tests=[RCVD_NUMERIC_HELO=1.253] X-Spam-Score: 1.253 X-Spam-Level: * X-Archive-Number: 200511/188 X-Sequence-Number: 6424 "Dave Page" writes: > I've been thinking about this whilst getting dragged round the shops > today, and having read Marko's, Johann's, Hiroshi's and other emails, > not to mention bits of the ODBC spec, here's where I think we stand. > > 1) The current driver works as expected with Unicode apps. > > 2) 7 bit ASCII apps work correctly. The driver manager maps the ANSI > functions to the Unicode ones, and because (as I think Marko pointed > out) the basic latin chars map directly into the lower Unicode > characters (see http://www.unicode.org/charts/PDF/U0000.pdf). > > 3) Some other single byte LATIN encodings do not work. This is because > the characters do not map directly into Unicode 80-FF > (http://www.unicode.org/charts/PDF/U0080.pdf). > > 4) Multibyte apps do not work. I believe that in fact they never will > with a Unicode driver, because multibyte characters simply won't map > into Unicode in the same way that ASCII does. The user cannot opt to use > the non-wide functions, because the DM automatically maps them to the > Unicode versions. > > Because the Driver Manager forces the user to use the *W functions if > they exist, I cannot see any way to make 3 or 4 work with a Unicode > driver. I agree that 4) can never work, because ODBC does not seem compatible with multibyte apps by design. ODBC caters for "ANSI" and "Unicode" strings, that's all. However, I don't get why 3) does not work. From here: If the driver is a Unicode driver, the Driver Manager makes function calls as follows: - Converts an ANSI function (with the A suffix) to a Unicode function (with the W suffix) by converting the string arguments into Unicode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ characters and passes the Unicode function to the driver. Are you saying in 3) that the "converting" underlined above is actually just a static cast?! Is this "bug" true for every driver manager out there?