From: Andrei Kovalevski <andyk@commandprompt.com>
To: FabijanicA@nucorsteel.com
Cc: pgsql-odbc@postgresql.org
Subject: Re: Linux Unicode character size
Date: Thu, 03 Jan 2008 19:34:58 +0200
Message-ID: <477D1CC2.6000001@commandprompt.com> (raw)
In-Reply-To: <OF554A781B.29F80DF3-ON852573C5.00516502-852573C5.00521918@nucorsteel.com>
References: <OF554A781B.29F80DF3-ON852573C5.00516502-852573C5.00521918@nucorsteel.com>
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 <wchar.h>
#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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: andyk@commandprompt.com, FabijanicA@nucorsteel.com
Subject: Re: Linux Unicode character size
In-Reply-To: <477D1CC2.6000001@commandprompt.com>
References: <OF554A781B.29F80DF3-ON852573C5.00516502-852573C5.00521918@nucorsteel.com> <477D1CC2.6000001@commandprompt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox