X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7A77AD79AE for ; Tue, 20 Sep 2005 03:51:11 -0300 (ADT) 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 57571-05 for ; Tue, 20 Sep 2005 06:51:05 +0000 (GMT) Received: from inetrt.skcapi.co.jp (inetrt.skcapi.co.jp [219.163.131.10]) by svr1.postgresql.org (Postfix) with ESMTP id 0A3FBD7772 for ; Tue, 20 Sep 2005 03:51:05 -0300 (ADT) Received: from hiroshi5jz7dqj (firewall.skcapi.co.jp [219.163.131.14]) by inetrt.skcapi.co.jp (8.13.1/8.13.1) with SMTP id j8K6meDq040274; Tue, 20 Sep 2005 15:48:43 +0900 (JST) (envelope-from saito@inetrt.skcapi.co.jp) Message-ID: <06d501c5bdaf$a9748780$01324d80@hiroshi5jz7dqj> From: "Hiroshi Saito" To: "?????? ?????" Cc: References: <1443836969.20050919122647@sart.must-ipra.com> Subject: Re: client encoding mismatch Date: Tue, 20 Sep 2005 15:51:00 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_06D2_01C5BDFB.19550390" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.022 required=5 tests=[AWL=0.022] X-Spam-Level: X-Archive-Number: 200509/160 X-Sequence-Number: 6058 This is a multi-part message in MIME format. ------=_NextPart_000_06D2_01C5BDFB.19550390 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi Andrey. This may not be good management. However, Some problems will be solved. This is correspondence only by the Multibyte. I desire proper evaluation by Dave. Regards, Hiroshi Saito From: "Andrey Repko" > Hello all, > > conn=16530880, PGAPI_DriverConnect( in)='DSN=dep2_try;', fDriverCompletion=0 > DSN info: DSN='dep2_try',server='127.0.0.1',port='5544',dbase='template1',user='postgres',passwd='xx xxx' > onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0' > conn_settings='',conn_encoding='OTHER' > translation_dll='',translation_option='' > Global Options: Version='08.01.0004', fetch=100, socket=8192, unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190 > disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=0 > text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64 > extra_systable_prefixes='dd_;', conn_settings='' conn_encoding='OTHER' > conn=16530880, query='select version()' > [ PostgreSQL version string = 'PostgreSQL 8.1beta2 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)' ] > [ PostgreSQL version number = '8.1' ] > conn=16530880, query='set DateStyle to 'ISO'' > conn=16530880, query='set geqo to 'OFF'' > conn=16530880, query='set extra_float_digits to 2' > conn=16530880, query='select oid from pg_type where typname='lo'' > [ Large Object oid = 16609 ] > conn=16530880, query='select pg_client_encoding()' > [ Client encoding = 'WIN1251' (code = 22) ] > Client encoding = 'WIN1251' and WIN > CONN ERROR: func=PGAPI_DriverConnect, desc='Error from CC_Connect', errnum=214, errmsg='client encoding mismatch' > ------------------------------------------------------------ > henv=16530824, conn=16530880, status=0, num_stmts=16 > > Maybe this information can be helpful: > > Run at PG 8.1 > ----------- > select pg_client_encoding(); > result = WIN1251 > -------------- > Run at PG 8.0 > ----------- > select pg_client_encoding(); > result = WIN > -------------- > > Subj error occur only on PG 8.1, not 8.0. > > At whatnew: > E.1.3.7. Encoding and Locale Changes > > Rename some encodings to be more consistent and to follow international standards (Bruce) > UNICODE is now UTF8 > ALT is now WIN866 > WIN is now WIN1251 > TCVN is now WIN1258 > > http://developer.postgresql.org/docs/postgres/release.html#RELEASE-8-1 > ------=_NextPart_000_06D2_01C5BDFB.19550390 Content-Type: application/octet-stream; name="encoding_patch.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="encoding_patch.diff" --- multibyte.c.orig Tue Sep 20 14:35:19 2005=0A= +++ multibyte.c Tue Sep 20 15:35:47 2005=0A= @@ -29,6 +29,7 @@=0A= { "EUC_TW", EUC_TW },=0A= { "JOHAB", JOHAB },=0A= { "UNICODE", UTF8 },=0A= + { "UTF8", UTF8 }, /* Corresponding from Version 8.1 */=0A= { "MULE_INTERNAL",MULE_INTERNAL },=0A= { "LATIN1", LATIN1 },=0A= { "LATIN2", LATIN2 },=0A= @@ -41,11 +42,14 @@=0A= { "LATIN9", LATIN9 },=0A= { "LATIN10", LATIN10 },=0A= { "WIN1256", WIN1256 },=0A= - { "TCVN", TCVN },=0A= + { "TCVN", WIN1258 },=0A= + { "WIN1258", WIN1258 }, /* Corresponding from Version 8.1 */=0A= { "WIN874", WIN874 },=0A= { "KOI8", KOI8R },=0A= { "WIN", WIN1251 },=0A= - { "ALT", ALT },=0A= + { "WIN1251", WIN1251 }, /* Corresponding from Version 8.1 */=0A= + { "ALT", WIN866 },=0A= + { "WIN866", WIN866 }, /* Corresponding from Version 8.1 */=0A= { "ISO_8859_5", ISO_8859_5 },=0A= { "ISO_8859_6", ISO_8859_6 },=0A= { "ISO_8859_7", ISO_8859_7 },=0A= @@ -399,6 +403,12 @@=0A= break; =0A= case 1250: =0A= wenc =3D "WIN1250"; =0A= + break; =0A= + case 1251: =0A= + if (PG_VERSION_GE(self, 8.1)) =0A= + wenc =3D "WIN1251"; =0A= + else=0A= + wenc =3D "WIN"; =0A= break; =0A= case 1252: =0A= if (PG_VERSION_GE(self, 7.2)) =0A= --- multibyte.h.orig Tue Sep 20 14:30:36 2005=0A= +++ multibyte.h Tue Sep 20 14:35:07 2005=0A= @@ -28,11 +28,11 @@=0A= #define LATIN9 16 /* ISO-8859 Latin 9 */=0A= #define LATIN10 17 /* ISO-8859 Latin 10 */=0A= #define WIN1256 18 /* Arabic Windows */=0A= -#define TCVN 19 /* Vietnamese Windows */=0A= +#define WIN1258 19 /* Vietnamese Windows */=0A= #define WIN874 20 /* Thai Windows */=0A= #define KOI8R 21 /* KOI8-R/U */=0A= #define WIN1251 22 /* windows-1251 */=0A= -#define ALT 23 /* Alternativny Variant (MS-DOS CP866) */=0A= +#define WIN866 23 /* Alternativny Variant (MS-DOS CP866) */=0A= #define ISO_8859_5 24 /* ISO-8859-5 */=0A= #define ISO_8859_6 25 /* ISO-8859-6 */=0A= #define ISO_8859_7 26 /* ISO-8859-7 */=0A= ------=_NextPart_000_06D2_01C5BDFB.19550390--