Skip site navigation (1) Skip section navigation (2)

ODBC & character encoding

From: "Layet Benjamin" <benjamin(at)moonfactory(dot)co(dot)jp>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: ODBC & character encoding
Date: 2005-02-07 07:04:07
Message-ID: 002501c50ce3$37edad80$9285a8c0@moonfactory.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
Hi,
I am trying to run a query from .Net C# using ODBC on a Postgres 7.1 
Database.

The database encoding is EUC_JP.
And as I use .Net the default encoding is UTF8.

My problem is that the 7.1 version does not support to set the client 
encoding to UTF8 :
Here is the ODBC error log:
<code>
[ Client encoding = 'EUC_JP' (code = 1) ]
conn=105462528, query='set client_encoding to 'UTF8''
ERROR from backend during send_query: 'ERROR:  Client encoding UTF8 is not 
supported'
</code>

So when I insert Data, the japanese characters don't appear properly....
The database is running for a production server and I cannot stop the 
service at all... Not to mention upgrading...


So my question is :
 - Can the ODBC driver convert the query string from UTF8 to EUC_JP before 
sending it to the database server ?
and how ?

I hope you understand my problem and my question...
Any help would be extremely appreciated,
Benjamin

Responses

pgsql-odbc by date

Next:From: IainDate: 2005-02-07 07:34:05
Subject: Re: ODBC & character encoding
Previous:From: JohannDate: 2005-02-07 04:20:04
Subject: queries run twice unless 'parse statements' checked?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group