pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Saito <saito@inetrt.skcapi.co.jp>
To: ?????? ????? <repko@sart.must-ipra.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: client encoding mismatch
Date: Tue, 20 Sep 2005 15:51:00 +0900
Message-ID: <06d501c5bdaf$a9748780$01324d80@hiroshi5jz7dqj> (raw)
References: <1443836969.20050919122647@sart.must-ipra.com>

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
>

Attachments:

encoding_patch.diff (application/octet-stream, 1.8K) download --- multibyte.c.orig Tue Sep 20 14:35:19 2005 +++ multibyte.c Tue Sep 20 15:35:47 2005 @@ -29,6 +29,7 @@ { "EUC_TW", EUC_TW }, { "JOHAB", JOHAB }, { "UNICODE", UTF8 }, + { "UTF8", UTF8 }, /* Corresponding from Version 8.1 */ { "MULE_INTERNAL",MULE_INTERNAL }, { "LATIN1", LATIN1 }, { "LATIN2", LATIN2 }, @@ -41,11 +42,14 @@ { "LATIN9", LATIN9 }, { "LATIN10", LATIN10 }, { "WIN1256", WIN1256 }, - { "TCVN", TCVN }, + { "TCVN", WIN1258 }, + { "WIN1258", WIN1258 }, /* Corresponding from Version 8.1 */ { "WIN874", WIN874 }, { "KOI8", KOI8R }, { "WIN", WIN1251 }, - { "ALT", ALT }, + { "WIN1251", WIN1251 }, /* Corresponding from Version 8.1 */ + { "ALT", WIN866 }, + { "WIN866", WIN866 }, /* Corresponding from Version 8.1 */ { "ISO_8859_5", ISO_8859_5 }, { "ISO_8859_6", ISO_8859_6 }, { "ISO_8859_7", ISO_8859_7 }, @@ -399,6 +403,12 @@ break; case 1250: wenc = "WIN1250"; + break; + case 1251: + if (PG_VERSION_GE(self, 8.1)) + wenc = "WIN1251"; + else + wenc = "WIN"; break; case 1252: if (PG_VERSION_GE(self, 7.2)) --- multibyte.h.orig Tue Sep 20 14:30:36 2005 +++ multibyte.h Tue Sep 20 14:35:07 2005 @@ -28,11 +28,11 @@ #define LATIN9 16 /* ISO-8859 Latin 9 */ #define LATIN10 17 /* ISO-8859 Latin 10 */ #define WIN1256 18 /* Arabic Windows */ -#define TCVN 19 /* Vietnamese Windows */ +#define WIN1258 19 /* Vietnamese Windows */ #define WIN874 20 /* Thai Windows */ #define KOI8R 21 /* KOI8-R/U */ #define WIN1251 22 /* windows-1251 */ -#define ALT 23 /* Alternativny Variant (MS-DOS CP866) */ +#define WIN866 23 /* Alternativny Variant (MS-DOS CP866) */ #define ISO_8859_5 24 /* ISO-8859-5 */ #define ISO_8859_6 25 /* ISO-8859-6 */ #define ISO_8859_7 26 /* ISO-8859-7 */ =

view thread (10+ messages)  latest in thread

Message-ID: <06d501c5bdaf$a9748780$01324d80@hiroshi5jz7dqj>
Permalink:  ../06d501c5bdaf$a9748780$01324d80@hiroshi5jz7dqj/
Also on:    postgresql.org/message-id/06d501c5bdaf$a9748780$01324d80@hiroshi5jz7dqj

 ·  · 

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: saito@inetrt.skcapi.co.jp, repko@sart.must-ipra.com
  Subject: Re: client encoding mismatch
  In-Reply-To: <06d501c5bdaf$a9748780$01324d80@hiroshi5jz7dqj>
  References: <1443836969.20050919122647@sart.must-ipra.com> <06d501c5bdaf$a9748780$01324d80@hiroshi5jz7dqj>

* 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