Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3A2E76325BD for ; Fri, 23 Jan 2009 19:43:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 41533-01 for ; Fri, 23 Jan 2009 19:43:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id 94E976325BC for ; Fri, 23 Jan 2009 19:43:19 -0400 (AST) Received: (qmail 15857 invoked by uid 512); 23 Jan 2009 23:43:17 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 23 Jan 2009 23:43:17 -0000 Received: from unknown (HELO ?192.168.11.3?) (219.61.40.6) by sd.tpf.co.jp with SMTP; 23 Jan 2009 23:43:17 -0000 Message-ID: <497A5611.6000802@tpf.co.jp> Date: Sat, 24 Jan 2009 08:43:13 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Kenneth Lundin CC: pgsql-odbc@postgresql.org Subject: Re: Localized error messages, wrong charset References: <93d3a1c90901230504u19f6dafau4c04a88aefef55d1@mail.gmail.com> In-Reply-To: <93d3a1c90901230504u19f6dafau4c04a88aefef55d1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.125 tagged_above=0 required=5 tests=DNS_FROM_RFC_BOGUSMX=2.125 X-Spam-Level: ** X-Archive-Number: 200901/21 X-Sequence-Number: 9760 Hi Kenneth, Kenneth Lundin wrote: > Hi, > > i'm coding a project in C# / VS2008 and i'm using postgres/ODBC for > database connectivity. Everthing works fine except for one tiny detail, > and that is that i'm having trouble with OdbcExceptions and the Message > property. It seems that the Message is not in the expected charset since > all swedish characters are turned into box-like characters when they are > displayed in a normal MessageBox control. I'm not sure which charset > windows is using internally since that is sort of invisible to the > programmer, but i would have assumed it is using some sort of unicode > strings. > > Anyway, either the OdbcException.Message property does not return a > UTF-8 string, OR it does return a UTF-8 string and Windows can not use > that (but I think it is the first alternative, because if it would have > returned UTF-8, there would have been several box-like characters per > "real" character, and currently there is a one-to-one match). > > Everywhere else, unicode/UTF-8 strings works beautifully, in Sorting, > LIKE, ILIKE etc throughout the application, and it also looks correctly > when i'm looking at the data using pgAdmin, so it's only the error > messages that does not work. Could you send me directly the Mylog output ? regards, Hiroshi Inoue