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 AE99752C19 for ; Fri, 19 Aug 2005 11:12:05 -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 46537-04 for ; Fri, 19 Aug 2005 14:11:58 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by svr1.postgresql.org (Postfix) with ESMTP id 4B15652BE2 for ; Fri, 19 Aug 2005 11:11:57 -0300 (ADT) Received: from p548F1B85.dip0.t-ipconnect.de [84.143.27.133] (helo=pse.dyndns.org) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwh2-1E67bF30Ig-0003s7; Fri, 19 Aug 2005 16:12:01 +0200 Received: from p548f1e1e.dip0.t-ipconnect.de ([84.143.30.30] helo=[10.10.11.120]) by pse.dyndns.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.44) id 1E67bE-0000dw-DJ; Fri, 19 Aug 2005 16:12:00 +0200 Message-ID: <4305E8A4.6000306@pse-consulting.de> Date: Fri, 19 Aug 2005 16:11:48 +0200 From: Andreas Pflug User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marc Herbert Cc: pgsql-odbc@postgresql.org Subject: Re: Bug or not about ASCII and Multi-Byte character set References: <430599D0.9030801@pse-consulting.de> <20050819093732.GG16062@emicnetworks.com> In-Reply-To: <20050819093732.GG16062@emicnetworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de login:0ce7ee5c3478b8d72edd8e05ccd40b70 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.088 required=5 tests=[AWL=-0.754, FORGED_RCVD_HELO=0.05, RCVD_IN_NJABL_DUL=1.655, RCVD_IN_SORBS_DUL=0.137] X-Spam-Level: * X-Archive-Number: 200508/167 X-Sequence-Number: 5806 Marc Herbert wrote: >If SQL_ASCII is/was equivalent to "ignoring encoding", then it >looks/looked pretty misnamed! > It's not. It should be used for ASCII only, but the database system will not barf if you offer it a byte with the upper bit set. You're simply on your own. >Encoding ignorance should rather be called SQL_BINARY. A BINARY setting >for strings makes sense, just like when transfering text files using >FTP: you just don't trust FTP for encodings and use it like a >filesystem. BINARY just means that: "don't mess-up with encodings and >let something else deal with the issue". > > No, binary would include 0x00 which is definitely *not* a character but the string terminator. If SQL_ASCII would be implemented nowadays, there probably would be a check for the upper bit cleared, and have it rejected otherwise. But since this part is really really old, this can't be changed without breaking zillions of old apps that used to ignore proper storage encoding. >I guess some people knew what they did and simply did not mixed >driver/apps, or in a way they mastered and that worked. > > The latter, with the obvious chance to break if the next app accesses the data. This is certainly not the design goal of a RDBMS. >Well while reading at the complaints it seems this BINARY mode was >there before (by "accident"?), > No. >Looks like people fixed issues by themselves before, > They didn't fix anything, they worked around the wrong chosen server encoding. I perfectly understand this, because initially I did the same mistake. > and Postgres >recent fixing does not interact nicely with theirs? > > Automatically choosing the right client encoding and properly converting in the driver did (and maybe still has) bugs, but fixing these will certainly support the rules as proper design requires it, not ill-designed apps. >PS: BTW "unicode" is not one encoding but many different ones. > > Doesn't matter. Always means the current Unicode for the system: in the backend UTF-8, on Win32 UCS16, Linux UCS32 or UTF-8 dependent on interface definition. The *driver* has to take care of the proper conversion, *if* it is instructed correctly (i.e. correct server encoding) Regards, Andreas