X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7B1CD8B9DFB for ; Mon, 7 Feb 2005 08:06:39 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11640-08 for ; Mon, 7 Feb 2005 08:06:31 +0000 (GMT) Received: from moonfactory.co.jp (0.moonfactory.co.jp [211.5.120.193]) by svr1.postgresql.org (Postfix) with ESMTP id 33A988B9D23 for ; Mon, 7 Feb 2005 08:06:31 +0000 (GMT) Received: from benjamindon (192.168.133.146) by moonfactory.co.jp with ESMTP (Eudora Internet Mail Server 3.0.3); Mon, 7 Feb 2005 17:06:31 +0900 Message-ID: <005101c50ceb$ee3f7070$9285a8c0@moonfactory.co.jp> From: "Layet Benjamin" To: "Iain" , References: <002501c50ce3$37edad80$9285a8c0@moonfactory.co.jp> <001301c50ce7$6a23ffd0$7201a8c0@mst1x5r347kymb> Subject: Re: ODBC & character encoding Date: Mon, 7 Feb 2005 17:06:30 +0900 Organization: Moonfactory MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004D_01C50D37.5DF029F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.044 tagged_above=0 required=5 tests=AWL, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200502/25 X-Sequence-Number: 4915 This is a multi-part message in MIME format. ------=_NextPart_000_004D_01C50D37.5DF029F0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_004D_01C50D37.5DF029F0 Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable
Hi,
Thank you Iain for your = quick=20 reply.
But unfortunately this did not solve the problem, 7.1 does not = support this=20 conversion neither yet. (7.3 and 7.4 do):
 
SET client_encoding=3D'UNICODE';
ERROR:  Conversion between = UNICODE=20 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
 
       =20 C#            = ;            =            =20 ODBC           &nb= sp;    =20 Postgres=20 7.1
Utf8          &n= bsp;      =20 l =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> =20 l            =    =20 l =3D=3D=3D=3D=3D>l = UTF8->EUC_JP
(possible->Unicode)  =20 l     UTF8        = l            =    =20 l UTF8  l
______________________l  (or Unicode)   = l________________l       = l_______________
 
 
2
       =20 C#            = ;            =            =20 ODBC           &nb= sp;    =20 Postgres=20 7.1
Utf8          &n= bsp;      =20 l =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>  l = UTF8->EUC_JP   l=20 =3D=3D=3D=3D=3D>l
(possible->Unicode)   = l    =20 UTF8       =20 l            =    =20 l EUC_JPl
______________________l  (or Unicode)  =20 l________________l       = l_______________
 
 
3

       =20 C#            = ;            =            =20 ODBC           &nb= sp;    =20 Postgres=20 7.1
UTF8->EUC_JP        &nb= sp; l=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> =20 l            =    =20 l =3D=3D=3D=3D=3D>l
(possible->Unicode)   = l    =20 EUC_JP     =20 l            =    =20 l=20 EUC_JPl
______________________l      &nb= sp;         =20 l________________l       = l_______________
 
 
Number 1 seem to be the normal solution, but it does not work with=20 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=20 before sending it to the database server ?
or
- Can the ODBC driver take EUC_JP string as input ? (then I = would=20 'just' have to figure out how to send EUC_JP stings from = C#...) 
 
Help extremely needed...
Thank you !
 
Benjamin
 
------=_NextPart_000_004D_01C50D37.5DF029F0--