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 93AA38B9E95 for ; Fri, 18 Feb 2005 20:18:23 +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 37919-08 for ; Fri, 18 Feb 2005 20:18:12 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9952F8B9E7B for ; Fri, 18 Feb 2005 20:18: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 j1IKICH2020633; Fri, 18 Feb 2005 15:18:12 -0500 (EST) To: "Joel Fradkin" Cc: pgsql-odbc@postgresql.org Subject: Re: encoding using the odbc driver In-reply-to: <000a01c515f3$d0b6e310$797ba8c0@jfradkin> References: <000a01c515f3$d0b6e310$797ba8c0@jfradkin> Comments: In-reply-to "Joel Fradkin" message dated "Fri, 18 Feb 2005 14:55:35 -0500" Date: Fri, 18 Feb 2005 15:18:12 -0500 Message-ID: <20632.1108757892@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/94 X-Sequence-Number: 4984 "Joel Fradkin" writes: > It failed on French strings we had in the database (this was confusing as it > had worked prior). After looking at it I isolated the issue to the encoding > being Unicode (the odbc driver loads the data base when the data base is > SQL_ASCII, but not when it is Unicode; I thought I would want Unicode). That means that the data you have is not in Unicode, but some other encoding (and no, I cannot tell what from this information). You can load it into the database only by setting client_encoding to tell what encoding the data is, so that the server can convert it to Unicode correctly. BTW, I believe that server_encoding = UNICODE doesn't currently work well on Windows, due to inadequate support from the operating system. So that could be contributing to your problems as well, if you're trying to run the server on Windows. If you don't know and don't care what encoding you're using, you're best off to set server_encoding = SQL_ASCII; that is more or less meant to describe that state of ignorance ;-) regards, tom lane