From a8bd7e1c6e026678019b2f25cffc0a94ce62b24b Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 5 Mar 2002 05:52:50 +0000 Subject: > Tatsuo Ishii wrote: > > > > It was made to cope with encoding such as an Asian bloc in 7.2Beta2. > > > > > > > > Added ServerEncoding > > > > Korean (JOHAB), Thai (WIN874), > > > > Vietnamese (TCVN), Arabic (WIN1256) > > > > > > > > Added ClientEncoding > > > > Simplified Chinese (GBK), Korean (UHC) > > > > > > > > > > > > > http://www.sankyo-unyu.co.jp/Pool/postgresql-7.2b2.newencoding.diff.tar.gz > > > > (608K) > > > > > > Looks good. I need some people to review this for me. > > > > For me they look good too. The only missing part is a > > documentation. I will ask him to write it up. If he couldn't, I will > > do it for him. > > > The diff is 3mb > > > but appears to address only additions to multibyte. I have attached a > > > list of files it modifies. Also, look at the sizes of the mb/ > > > directory. It is getting large: > > > > > > 4 ./CVS > > > 6 ./Unicode/CVS > > > 3433 ./Unicode > > > 6197 . > > > > Yes. We definitely need the on-the-fly encoding addition capability: > > i.e. CREATE CHRACTER SET in the future... > > -- > > Tatsuo Ishii > > > > Address chainge. http://www.sankyo-unyu.co.jp/Pool/postgresql-7.2.newencoding.diff.gz Add PsqlODBC and document ...etc patch. Eiji Tokuya --- src/interfaces/odbc/connection.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'src/interfaces/odbc/connection.c') diff --git a/src/interfaces/odbc/connection.c b/src/interfaces/odbc/connection.c index 66ef5e9ae4..389da5698a 100644 --- a/src/interfaces/odbc/connection.c +++ b/src/interfaces/odbc/connection.c @@ -944,6 +944,9 @@ another_version_retry: CC_send_settings(self); CC_lookup_lo(self); /* a hack to get the oid of our large * object oid type */ +#ifdef MULTIBYTE + CC_lookup_characterset(self); +#endif CC_lookup_pg_version(self); /* Get PostgreSQL version for SQLGetInfo * use */ @@ -1247,9 +1250,27 @@ CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi) if (QR_command_successful(res)) QR_set_status(res, PGRES_NONFATAL_ERROR); QR_set_notice(res, cmdbuffer); /* will dup this string */ - - mylog("~~~ NOTICE: '%s'\n", cmdbuffer); - qlog("NOTICE from backend during send_query: '%s'\n", cmdbuffer); +#ifdef MULTIBYTE + if (strstr(cmdbuffer,"encoding is")) + { + if (strstr(cmdbuffer,"Current client encoding is")) + strcpy(PG_CCSS, cmdbuffer + 36); + if (strstr(cmdbuffer,"Current server encoding is")) + strcpy(PG_SCSS, cmdbuffer + 36); + mylog("~~~ NOTICE: '%s'\n", cmdbuffer); + qlog("NOTICE from backend during send_query: '%s'\n ClientEncoding = %s\n ServerEncoding = %s\n", cmdbuffer, PG_CCSS, PG_SCSS); + + } + else + { + + mylog("~~~ NOTICE: '%s'\n", cmdbuffer); + qlog("NOTICE from backend during send_query: '%s'\n", cmdbuffer); + } +#else + mylog("~~~ NOTICE: '%s'\n", cmdbuffer); + qlog("NOTICE from backend during send_query: '%s'\n", cmdbuffer); +#endif while (msg_truncated) msg_truncated = SOCK_get_string(sock, cmdbuffer, ERROR_MSG_LENGTH); -- cgit v1.2.1