X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E5C4A8B9C0E for ; Fri, 18 Feb 2005 19:40:22 +0000 (GMT) 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 26706-05 for ; Fri, 18 Feb 2005 19:40:11 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C67BC8B9B8A for ; Fri, 18 Feb 2005 19:40:12 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1IJeB7o020378; Fri, 18 Feb 2005 14:40:11 -0500 (EST) To: "Joel Fradkin" Cc: pgsql-odbc@postgresql.org Subject: Re: encoding using the odbc driver In-reply-to: <000001c515e7$393aca30$797ba8c0@jfradkin> References: <000001c515e7$393aca30$797ba8c0@jfradkin> Comments: In-reply-to "Joel Fradkin" message dated "Fri, 18 Feb 2005 13:25:27 -0500" Date: Fri, 18 Feb 2005 14:40:11 -0500 Message-ID: <20377.1108755611@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/92 X-Sequence-Number: 4982 "Joel Fradkin" writes: > I changed my encoding from SQL_ASCII to UNICODE. > I believe the Unicode is supposed to support more languages? I think you're missing the point. The SQL_ASCII setting isn't an encoding, really; it's a declaration of ignorance. In this setting the server will just store and regurgitate whatever character strings you send it. This will work fine, more or less, if all your clients use exactly the same encoding and you don't care about functions like upper()/lower(). When you use UNICODE (or any other setting) then the server tries to enforce that what's stored in the database is actually valid data per that encoding. It will also provide encoding conversion for clients who select a different specific client_encoding. But a client that sets client_encoding = SQL_ASCII defeats the conversion and will see whatever's stored in the database. If you flip between SQL_ASCII and other settings, on either end, without clearly understanding what's happening, you're likely to get very confused. regards, tom lane