Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YYzxg-0002jl-Tr for pgsql-odbc@arkaria.postgresql.org; Fri, 20 Mar 2015 16:39:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YYzxg-000463-6i for pgsql-odbc@arkaria.postgresql.org; Fri, 20 Mar 2015 16:39:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YYzxf-00045x-FH for pgsql-odbc@postgresql.org; Fri, 20 Mar 2015 16:39:51 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YYzxb-0003XF-JT for pgsql-odbc@postgresql.org; Fri, 20 Mar 2015 16:39:50 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 98A71205E7 for ; Fri, 20 Mar 2015 12:39:43 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 20 Mar 2015 12:39:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= x-sasl-enc:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=uMpvG3WQriw4hIux546cZtjTv0s=; b=D2vHBWl0ZuYueniV7G Ypp26mh1bbX2Rl5b4Y/mpca+Tg5/D8qpEI/5v0YUx7aKQyIl7lCzsYxrPkW341fp gG7i3WF7tzUCs72EOSNK3Wwu0/BDF+awE4vB6LTjhnAUr8Jpxf2mq4FNZhYnSlUb Rbe83XmjJVhQjzvg1OX97zNKo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=uMpvG3WQriw4hIux546cZt jTv0s=; b=t4u7Gh+4+KFjEh0nYHe2C2e+JLergE5nUOH8xHlOrlt2tliBByBhJw kwmx+gU2DJ/3qUmAPwGgVx4PKis7iBhnreM0SdKdJBaXubki3Oyd7UOZyQBfIQs5 74QgHMOogt32zPPO4BiIsZzTUzxRcs5JZ6iLB8pCzbKoFY1ffY4A0= X-Sasl-enc: eoJAybqeWPBhttw0ueQXOBq5aEpxui7O7TXakQgACPvy 1426869585 Received: from killi.site (unknown [173.160.167.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 3759EC0001C; Fri, 20 Mar 2015 12:39:45 -0400 (EDT) Message-ID: <550C4D50.8030706@aklaver.com> Date: Fri, 20 Mar 2015 09:39:44 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Kadri Raudsepp CC: pgsql-odbc@postgresql.org Subject: Re: Problem with client_encoding and PsqlODBC driver. References: <550C3851.1080808@aklaver.com> <550C436E.6050905@aklaver.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 03/20/2015 09:28 AM, Kadri Raudsepp wrote: > > > On Fri, Mar 20, 2015 at 5:57 PM, Adrian Klaver > > wrote: > > On 03/20/2015 08:48 AM, Kadri Raudsepp wrote: > > Sorry, didn't see the first question at first - I haven't been > able to > find a way to specify encoding with openquery, every attempt has > resulted in syntax errors. > > > Just to be certain you are talking about?: > > https://msdn.microsoft.com/en-__us/library/ms188427.aspx > > > > Yes, this is what I'm using. > > > > Some more questions: > > 1) Where is your Postgres server and on what OS? > > > The servers in question, SQL server and Postgres server, are in > different countries, if that's what you meant. Postgres runs on Debian > 3.16.7 x86_64. I'm the dba for the postgres database in question, but > not too familiar with MS tools. Data import will be done by MS dba-s in > their location, but they have had even less luck figuring out the > encoding issue. > > > 2) Do you have pgAdmin(http://www.pgadmin.__org/ > ) or the psql client installed on the > Windows machine? > If so does running a query through them show the correct results? > > > I did install PgAdmin III in the environment I set up for testing the > solution, which is as close as possible to the live environments we'll > be using. Simply running the query there gives the same garbled result, > "õ" instead of "õ" etc. Running "set client_encoding to latin1; > select * from table", however, gives the correct result. > I have given the instructions for getting the correct data via PgAdmin > and Import Data to my colleagues, but they are strictly MS people so I'm > yet to see how this works out. > I would prefer if there was minimal amount of trouble on their end, > because we'll be migrating the data while the services running on that > data have been turned off, which means any delay will cause financial > loss. That's why I'm looking to get the driver working. I do not use MS products much and SQL Server not all, so I am working blind here. That has never stopped me before, so what I could find that might apply: 1) This post: https://social.msdn.microsoft.com/forums/sqlserver/en-US/acb718fd-0943-4e1c-95b0-067361157821/how-to-use-openquery-for-utf8-character 2) Led me to: https://technet.microsoft.com/en-us/library/ms186839%28v=sql.105%29.aspx 3) Led me to: https://msdn.microsoft.com/en-us/library/ms144260%28v=sql.105%29.aspx My guess is the answer lies in the above, but that is requires someone more SQL Server savvy then I to unravel. > > > > > > Katie > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > > Katie -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc