X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 49FD99F9C10 for ; Thu, 4 May 2006 13:01:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 79247-04 for ; Thu, 4 May 2006 13:01:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 86ABB9F9B76 for ; Thu, 4 May 2006 13:01:21 -0300 (ADT) Received: from henry.newn.cam.ac.uk (henry.newn.cam.ac.uk [131.111.204.130]) by svr4.postgresql.org (Postfix) with ESMTP id BDD415B685C for ; Thu, 4 May 2006 16:01:20 +0000 (GMT) Received: from quartz.itdept.newn.cam.ac.uk ([192.168.200.180]) by henry.newn.cam.ac.uk with esmtp (Exim 4.20) id 1FbgGT-0005HD-UO; Thu, 04 May 2006 17:01:17 +0100 Received: from prlw1 by quartz.itdept.newn.cam.ac.uk with local (Exim 4.20) id 1FbgGT-0002gf-RR; Thu, 04 May 2006 17:01:17 +0100 Date: Thu, 4 May 2006 17:01:17 +0100 From: Patrick Welche To: pgsql-odbc@postgresql.org Subject: codepage Message-ID: <20060504160117.GS550@quartz.itdept.newn.cam.ac.uk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline User-Agent: Mutt/1.5.11 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/12 X-Sequence-Number: 7683 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Looking yet further at ERROR: conversion between latin9 and LATIN1 is not supported mulitbyte.c looks as though it needs the included patch, because support for WIN1252 encoding was added to the server on 2005/03/14 so was released with 8.1 (2005/11/08), and because latin9 is a worse match for win1252 than latin1. e.g., your windows client with win1252 sends a 1/2 character, 0xbd to a 8.1 server. The odbc code says 8.1>=7.1, I'll send 0xbd as latin9. But, 0xbd in latin9 is oe. 0xbd in latin1 is 1/2 and what you would expect. Some might say "ah but the euro symbol which exists in win1252 exists in latin9 but not in latin1". OK, but I would you represent it? In win1252, euro is 0x80. Send 0x80 as latin1 or latin9, get nothing - it's in the 0x80-0x9f control character range. Thoughts? Cheers, Patrick --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="mb.pat" Index: multibyte.c =================================================================== RCS file: /cvsroot/psqlodbc/psqlodbc/multibyte.c,v retrieving revision 1.44 diff -u -r1.44 multibyte.c --- multibyte.c 27 Apr 2006 14:49:04 -0000 1.44 +++ multibyte.c 4 May 2006 15:50:56 -0000 @@ -424,8 +424,8 @@ case 1252: if (oldenc) ; - else if (PG_VERSION_GE(conn, 7.2)) - wenc = "latin9"; + else if (PG_VERSION_GE(conn, 8.1)) + wenc = "WIN1252"; else wenc = "latin1"; break; --NzB8fVQJ5HfG6fxh--