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 6233652A3C for ; Sun, 24 Apr 2005 12:57:26 -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 95859-03 for ; Sun, 24 Apr 2005 15:57:15 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 02A9E5402D for ; Sun, 24 Apr 2005 12:56:46 -0300 (ADT) Received: (qmail invoked by alias); 24 Apr 2005 15:56:35 -0000 Received: from I8eb7.i.pppool.de (EHLO rk) [85.73.142.183] by mail.gmx.net (mp023) with SMTP; 24 Apr 2005 17:56:35 +0200 X-Authenticated: #7875691 Message-ID: <00e201c548e6$dbaaa9c0$14b2a8c0@rk> From: "Robert Max Kramer" To: Subject: Re: Driver uses always UTF-8? Date: Sun, 24 Apr 2005 18:01:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit 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-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.025 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/136 X-Sequence-Number: 5295 Hello, ich have fixed this issue now. I've downloaded the source code of the psqlodbc-Driver and took-a-look to the file win_unicode.c Then I modified the second conversion method in this file: ucs2_to_utf8(..) In the main if-statement it now doesn't ask wether the char is a "iswasscii()" or not, it now interpretes the given char as encoded in just ONE byte (Code for one-byte chars let in original). Believe my, now everything works. Umlaute from an to the DB, it all runs. Encoding is client-side and database-side in LATIN1. Regards, R M Kramer ----- Original Message ----- From: "Marko Ristola" To: Sent: Monday, April 11, 2005 7:06 PM Subject: Re: [ODBC] Driver uses always UTF-8? > > Hello, > > If I have understood the PostgreSQL ODBC driver, it supports > Unicode on Windows. In that case, the database needs to be in UTF-8. > > In the World, there is a LATIN1 -> UTF-8(UNICODE) transition going on. > So, LATIN1 users have a higher risk of finding new faults, like > this one in the PostgreSQL ODBC driver. > > > In my opinion, DB2 works, because the DB2 ODBC client driver > does charset conversions from the database charset into the > client charset and vice versa. > > I don't know the current state of PostgreSQL ODBC on this regard. > It would be very nice, if the database server could be in UTF-8 > and some old application would use LATIN1 and some new > application could use UTF-8 at the same time ... > > Regards, > Marko Ristola > > Robert Max Kramer wrote: > >> Hello, >> >> I want to substitue an existing DB2 to PG 8 and got a Problem. Much of >> our applications are written in Cobol and are using ODBC Interface to get >> data. With DB2, that runs. >> >> The Problem is now in my Test Environment when I connect to PG that I can >> read everything well except german umlaute (ä, ü,...). I always get "?" >> and not the umlaut. >> My database's encoding is LATIN1. Windows Codepage tried with 850 and >> 1252. >> >> When I read with client-side encoding UNICODE, I got the umlaute, but I >> cannot write them to PG. Wirte statements like INSERTs work with LATIN1 >> encoding. >> >> But something that never worked is, when I send a statement which should >> return values with umlaute in it and which have umlaute in a >> WHERE-clause. like: SELECT...FROM...WHERE text='ä'; >> >> I have tested it under WinNT as well as under WinXP. Same problem. Does >> anyone have an idea? >> >> Greetings, >> R M Kramer