Re: ODBC & character encoding - Mailing list pgsql-odbc

From Layet Benjamin
Subject Re: ODBC & character encoding
Date
Msg-id 005101c50ceb$ee3f7070$9285a8c0@moonfactory.co.jp
Whole thread Raw
In response to ODBC & character encoding  ("Layet Benjamin" <benjamin@moonfactory.co.jp>)
List pgsql-odbc
Hi,
Thank you Iain for your quick reply.
But unfortunately this did not solve the problem, 7.1 does not support this conversion neither yet. (7.3 and 7.4 do):
 
SET client_encoding='UNICODE';
ERROR:  Conversion between UNICODE and EUC_JP is not supported
 
In theory, I have 3 possible places to convert UTF8 to EUC_JP:
- 1 inside postgres
- 2 inside ODBC
- 3 inside C#
 
 
1
 
        C#                                    ODBC                 Postgres 7.1
Utf8                  l =============>  l                l =====>l UTF8->EUC_JP
(possible->Unicode)   l     UTF8        l                l UTF8  l
______________________l  (or Unicode)   l________________l       l_______________
 
 
2
        C#                                    ODBC                 Postgres 7.1
Utf8                  l =============>  l UTF8->EUC_JP   l =====>l
(possible->Unicode)   l     UTF8        l                l EUC_JPl
______________________l  (or Unicode)   l________________l       l_______________
 
 
3

        C#                                    ODBC                 Postgres 7.1
UTF8->EUC_JP          l =============>  l                l =====>l
(possible->Unicode)   l     EUC_JP      l                l EUC_JPl
______________________l                 l________________l       l_______________
 
 
Number 1 seem to be the normal solution, but it does not work with 7.1.
I would like to know if number 2 or 3 are possible:
so,
 - Can the ODBC driver convert the query string from UTF8 to EUC_JP before sending it to the database server ?
or
- Can the ODBC driver take EUC_JP string as input ? (then I would 'just' have to figure out how to send EUC_JP stings from C#...) 
 
Help extremely needed...
Thank you !
 
Benjamin
 

pgsql-odbc by date:

Previous
From: "Iain"
Date:
Subject: Re: ODBC & character encoding
Next
From: "Iain"
Date:
Subject: Re: ODBC & character encoding