Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E972F2E30E9 for ; Thu, 3 Jan 2008 13:35:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 72897-09 for ; Thu, 3 Jan 2008 13:35:14 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id B7D6A2E30DB for ; Thu, 3 Jan 2008 13:35:15 -0400 (AST) Received: from [77.109.28.238] ([77.109.28.238]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m03HZ42Z014917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Jan 2008 09:35:10 -0800 Message-ID: <477D1CC2.6000001@commandprompt.com> Date: Thu, 03 Jan 2008 19:34:58 +0200 From: Andrei Kovalevski User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: FabijanicA@nucorsteel.com CC: pgsql-odbc@postgresql.org Subject: Re: Linux Unicode character size References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Thu, 03 Jan 2008 09:35:13 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/3 X-Sequence-Number: 9310 Hello, First of all both driver and ODBC driver manager should be built correctly to support UNICODE on your system. Here are some lines from sqltypes.h (unixODBC 2.2.12): #ifdef SQL_WCHART_CONVERT /* * Use this if you want to use the C/C++ portable definition of a wide char, wchar_t * Microsoft hardcoded a definition of unsigned short which may not be compatible with * your platform specific wide char definition. */ #include #endif So, if you are building unixODBC with SQL_WCHART_CONVERT - you should specify the same option for psqlodbc. If SQLWCHAR = wchar_t, then sizeof(SQLWCHAR) = 4. If SQLWCHAR = unsigned short, then sizeof (SQLWCHAR) = 2. SQLWCHAR on Windows is always 2 bytes wide. FabijanicA@nucorsteel.com wrote: > > What is the character size expected by Unicode driver on Linux (or any > UNIX for that matter), i.e. does Unicode driver operate with UTF16 or 32? > > Thanks in advance, > > Alex----------------------------------------------------------------------------------------------------------------------------------------- > CONFIDENTIALITY NOTICE This e-mail contains privileged and > confidential information which is the property of Nucor, intended only > for the use of the intended recipient(s). Unauthorized use or > disclosure of this information is prohibited. If you are not an > intended recipient, please immediately notify Nucor and destroy any > copies of this email. Receipt of this e-mail shall not be deemed a > waiver by Nucor of any privilege or the confidential nature of the > information. -- Andrei Kovalevski PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/