pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedTranscoding problem with wine and unixodbc
8+ messages / 2 participants
[nested] [flat]
* Transcoding problem with wine and unixodbc
@ 2014-04-25 11:48 Pierre Couderc <pierre@couderc.eu>
0 siblings, 2 replies; 8+ messages in thread
From: Pierre Couderc @ 2014-04-25 11:48 UTC (permalink / raw)
To: pgsql-odbc
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.
For exemple <è> becomes <Ã"> (in 2 characters).
Any hint welcome...
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Transcoding problem with wine and unixodbc
@ 2014-04-25 23:40 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Pierre Couderc <pierre@couderc.eu>
1 sibling, 1 reply; 8+ messages in thread
From: Adrian Klaver @ 2014-04-25 23:40 UTC (permalink / raw)
To: Pierre Couderc <pierre@couderc.eu>; pgsql-odbc
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.
Are you sure your program actually picked up the change in drivers?
> For exemple <è> becomes <Ã"> (in 2 characters).
Can you get a psql connection to the database?
And if so what does it show?
Also what exactly is the encoding your client is using?
>
> Any hint welcome...
>
>
--
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
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Transcoding problem with wine and unixodbc
@ 2014-04-30 07:23 Pierre Couderc <pierre@couderc.eu>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 8+ messages in thread
From: Pierre Couderc @ 2014-04-30 07:23 UTC (permalink / raw)
To: pgsql-odbc
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.
> 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.
Or if you want to speak of my application, it is under wine in ANSI.
And I do not know who is responsible for translation, normally it should
be the unixodbc or psqlodbc...?
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Transcoding problem with wine and unixodbc
@ 2014-04-30 14:10 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Pierre Couderc <pierre@couderc.eu>
0 siblings, 1 reply; 8+ messages in thread
From: Adrian Klaver @ 2014-04-30 14:10 UTC (permalink / raw)
To: Pierre Couderc <pierre@couderc.eu>; pgsql-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
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Transcoding problem with wine and unixodbc
@ 2014-04-30 14:36 Pierre Couderc <pierre@couderc.eu>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 8+ messages in thread
From: Pierre Couderc @ 2014-04-30 14:36 UTC (permalink / raw)
To: pgsql-odbc
Thank you. I comment.
On 04/30/2014 04:10 PM, Adrian Klaver wrote:
> 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.
>
As expected by me, as pgAdminIII, psql prints correctly.
>
>>> 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.
>
LATIN1 (ISO-8859-1),
>> And I do not know who is responsible for translation, normally it should
>> be the unixodbc or psqlodbc..
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Transcoding problem with wine and unixodbc
@ 2014-04-30 15:34 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Pierre Couderc <pierre@couderc.eu>
0 siblings, 1 reply; 8+ messages in thread
From: Adrian Klaver @ 2014-04-30 15:34 UTC (permalink / raw)
To: Pierre Couderc <pierre@couderc.eu>; pgsql-odbc
On 04/30/2014 07:36 AM, Pierre Couderc wrote:
> Thank you. I comment.
>>
> As expected by me, as pgAdminIII, psql prints correctly.
Just to be clear where are you connecting from with psql?
>> ANSI is a general term. What is important is what character
>> set(encoding) you are actually using in your application.
>>
> LATIN1 (ISO-8859-1),
Well that should work with the Unicode driver. My guess is there is some
sort of confusion of what the encoding is between the app - psqlodbc -
Postgres.
Is the database you are using only used by your application?
If it is, one possible troubleshooting method would be to set
client_encoding in postgresql.conf to latin1. This will affect all the
clients connecting to your database, so use with care. For more
information see below:
http://www.postgresql.org/docs/9.3/interactive/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORM...
http://www.postgresql.org/docs/9.3/interactive/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED
>>> 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
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Transcoding problem with wine and unixodbc
@ 2014-05-02 15:29 Pierre Couderc <pierre@couderc.eu>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 8+ messages in thread
From: Pierre Couderc @ 2014-05-02 15:29 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-odbc
Le 30/04/2014 17:34, Adrian Klaver a écrit :
> On 04/30/2014 07:36 AM, Pierre Couderc wrote:
>> Thank you. I comment.
>
>
>>>
>> As expected by me, as pgAdminIII, psql prints correctly.
>
> Just to be clear where are you connecting from with psql?
Well, I open a terminal on my amd64 debia, jessie, and I ise psql from it.
> , I open a
>
>
>>> ANSI is a general term. What is important is what character
>>> set(encoding) you are actually using in your application.
>>>
>> LATIN1 (ISO-8859-1),
>
> Well that should work with the Unicode driver. My guess is there is
> some sort of confusion of what the encoding is between the app -
> psqlodbc - Postgres.
>
yes.
> Is the database you are using only used by your application?
>
> If it is, one possible troubleshooting method would be to set
> client_encoding in postgresql.conf to latin1. This will affect all
> the clients connecting to your database, so use with care. For more
> information see below:
>
> http://www.postgresql.org/docs/9.3/interactive/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORM...
>
>
> http://www.postgresql.org/docs/9.3/interactive/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED
>
>
>
No, I have many clients.
I must find a way to specify that THIS Client is LATIN1. Is there not a
way to specify it in a connect string ? I find notrhing in the doc.
>>>> And I do not know who is responsible for translation, normally it
>>>> should
>>>> be the unixodbc or psqlodbc..
>>
>>
>
>
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Transcoding problem with wine and unixodbc
@ 2014-05-02 15:59 Pierre Couderc <pierre@couderc.eu>
parent: Pierre Couderc <pierre@couderc.eu>
1 sibling, 0 replies; 8+ messages in thread
From: Pierre Couderc @ 2014-05-02 15:59 UTC (permalink / raw)
To: pgsql-odbc; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>
I answer myself.
Add :
"ConnSettings=SET CLIENT_ENCODING to 'LATIN1'
in odbc.ini
Thank you, Adrian, you did put me in the good direction.
On 04/25/2014 01:48 PM, 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.
> For exemple <è> becomes <Ã"> (in 2 characters).
>
> Any hint welcome...
>
>
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2014-05-02 15:59 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25 11:48 Transcoding problem with wine and unixodbc Pierre Couderc <pierre@couderc.eu>
2014-04-25 23:40 ` Adrian Klaver <adrian.klaver@aklaver.com>
2014-04-30 07:23 ` Pierre Couderc <pierre@couderc.eu>
2014-04-30 14:10 ` Adrian Klaver <adrian.klaver@aklaver.com>
2014-04-30 14:36 ` Pierre Couderc <pierre@couderc.eu>
2014-04-30 15:34 ` Adrian Klaver <adrian.klaver@aklaver.com>
2014-05-02 15:29 ` Pierre Couderc <pierre@couderc.eu>
2014-05-02 15:59 ` Pierre Couderc <pierre@couderc.eu>
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