pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Pierre Couderc <pierre@couderc.eu>
To: pgsql-odbc@postgresql.org
Subject: Re: Transcoding problem with wine and unixodbc
Date: Wed, 30 Apr 2014 07:10:14 -0700
Message-ID: <53610446.4000901@aklaver.com> (raw)
In-Reply-To: <5360A4FD.9050907@couderc.eu>
References: <535A4BAA.7050403@couderc.eu>
	<535AF27F.6060006@aklaver.com>
	<5360A4FD.9050907@couderc.eu>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 04/30/2014 12:23 AM, Pierre Couderc wrote:
>
> On 04/26/2014 01:40 AM, Adrian Klaver wrote:
>> On 04/25/2014 04:48 AM, Pierre Couderc wrote:
>>> I am still trying to excute a MFC application (working with psqlodbc
>>> under WinXP) under wine, unix psqlodbc, and unixodbc.
>>>
>>> My application is in ANSI, but the DB is in Unicode, so under Windows, I
>>> use Postgrsql Unicode driver (which transcodes..?) without any problem.
>>> Under wine, I have tried the 2 drivers (psqlodbcw.so and psqlodbca.so)
>>> and with the same incorrect result.
>>
>> Hmm. I would have expected different results.
> Me too.
>>
>> Are you sure your program actually picked up the change in drivers?
> Yes, I am sure  : I choose "PostgreSQL ANSI" (in odbc.ini) I get a good
> result but  the bad <Ã"> result. I change odbc.ini to a unexistant
> driver : I get an application error, then I choose "PostgreSQL Unicode",
> and I get the same  bad <Ã"> result.
>>
>>> For exemple <è> becomes <Ã"> (in 2 characters).
>>
>> Can you get a psql connection to the database?
> yes.
>>
>> And if so what does it show?
>>
> I do not know (as I do not know how to use pgsql). But I am sure that
> the database is Unicode, and for exmple PGadmin III (either on the same
> debian machine or on W7) reads it without problem.

Once you have psql open, type the query you want:

select * from some_table;

where some_table is the one with the characters you are having problems 
with.


>> Also what exactly is the encoding your client is using?
>>
> Mmm, I am not sure to know what is "my" Client. I suppose that the
> client of the DB is psqlodbc.

Well psqlodbc is more of an adapter that is passing information from 
your application to Postgres.

> Or if you want to speak of my application, it is under wine in ANSI.

ANSI is a general term. What is important is what character 
set(encoding) you are actually using in your application.

> And I do not know who is responsible for translation, normally it should
> be the unixodbc or psqlodbc...?
>
>


-- 
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



view thread (8+ messages)  latest in thread

Message-ID: <53610446.4000901@aklaver.com>
Permalink:  ../53610446.4000901@aklaver.com/
Also on:    postgresql.org/message-id/53610446.4000901@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: adrian.klaver@aklaver.com, pierre@couderc.eu
  Subject: Re: Transcoding problem with wine and unixodbc
  In-Reply-To: <53610446.4000901@aklaver.com>
  References: <535A4BAA.7050403@couderc.eu> <535AF27F.6060006@aklaver.com> <5360A4FD.9050907@couderc.eu> <53610446.4000901@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox