X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9B70AD1B906 for ; Tue, 9 Mar 2004 03:52:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 99361-04 for ; Mon, 8 Mar 2004 23:51:58 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id C41D7D1B905 for ; Mon, 8 Mar 2004 23:51:54 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i293ps1Y018347 for ; Tue, 9 Mar 2004 03:51:54 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i293hX7S017304 for pgsql-odbc@postgresql.org; Tue, 9 Mar 2004 03:43:34 GMT Date: Mon, 08 Mar 2004 22:43:33 -0500 From: Al Cohen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.interfaces.odbc Subject: Unicode conversion issue Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 15 X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 To: pgsql-odbc@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/20 X-Sequence-Number: 3822 We have a PostgreSQL database in Unicode that I'm trying to read into a C# application. In theory, the easiest thing to do would be to use the Beta ODBC Unicode driver or one of the .NET data providers for PostgreSQL, but these seem to be fairly immature. So, I'm hoping to use the standard ODBC driver, which seems quite mature, to read and write to a Unicode database. Can this be done by properly decoding and encoding? For starters, I'm wondering if someone can help me to understand just what the standard psqlODBC is returning to my C# application when I read a unicode string? The ASCII characters (<128) are returning as ASCII characters, but the higher characters are turning into 4 unicode characters, or 8 bytes. My initial thought was that this was UTF-8, but UTF-8 is maximum 6 bytes.