pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Iain <iain@mst.co.jp>
To: Layet Benjamin <benjamin@moonfactory.co.jp>
To: pgsql-odbc@postgresql.org
Subject: Re: ODBC & character encoding
Date: Mon, 7 Feb 2005 16:34:05 +0900
Message-ID: <001301c50ce7$6a23ffd0$7201a8c0@mst1x5r347kymb> (raw)
References: <002501c50ce3$37edad80$9285a8c0@moonfactory.co.jp>

Hi,

I havn't dne much with unicode on a PG database yet, so this is just a guess 
(albeit an educated one based on what i read in the docs)

Maybe you need to use "set client_encoding to 'UNICODE'" as there didn't 
appear to be a UTF8 encoding as such.

refer to section 20.2.1 of the 7.4 manual: 
http://www.postgresql.org/docs/7.4/interactive/multibyte.html - don't think 
this has changed since 7.1, but you should check it.

regards
Iain
  ----- Original Message ----- 
  From: Layet Benjamin
  To: pgsql-odbc@postgresql.org
  Sent: Monday, February 07, 2005 4:04 PM
  Subject: [ODBC] ODBC & character encoding


  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

view thread (5+ messages)  latest in thread

Message-ID: <001301c50ce7$6a23ffd0$7201a8c0@mst1x5r347kymb>
Permalink:  ../001301c50ce7$6a23ffd0$7201a8c0@mst1x5r347kymb/
Also on:    postgresql.org/message-id/001301c50ce7$6a23ffd0$7201a8c0@mst1x5r347kymb

 · 

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: iain@mst.co.jp, benjamin@moonfactory.co.jp
  Subject: Re: ODBC & character encoding
  In-Reply-To: <001301c50ce7$6a23ffd0$7201a8c0@mst1x5r347kymb>
  References: <002501c50ce3$37edad80$9285a8c0@moonfactory.co.jp> <001301c50ce7$6a23ffd0$7201a8c0@mst1x5r347kymb>

* 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