[unixODBC-support] Unicode

FAU fau at email.com
Thu Jul 11 18:03:43 BST 2013

On Wed, 2013-07-10 at 08:09 +0100, Nick Gorham wrote:
> On 10/07/13 00:33, FAU wrote:
> > Hello,
> > I'm reading about (unix)ODBC and in particular I'm trying to sort out
> > how the unicode part works.
> >
> > Lets say your database back-end is using UTF-8 (I believe that is what
> > Postgres uses for unicode).  Do I have to call the ANSI functions in
> > this case?
> Yes,
> > Lets say you use the wide function versions and your database back-end
> > uses UTF-8 does the DM automatically convert to from UCS-2 (or UTF-16)?
> if you use iconv and select the correct char sets when building the DM 
> to go from UCS-2 and UTF-8. But if the database driver also exports the 
> W functions they will be passed unchanged.
> >
> > In general does the DM wide API expects data to be in UCS-2?
> Yes, As in most cases the goal is to match the Windows version. The key 
> is the W functions are Wide, so 16 bit. If you read the X-Open version 
> of the spec, there is no W API, single and multi byte character sets are 
> intended to go via the standard (not W) API.
Well isn't UCS-2 deprecated starting from sometime around Win2000 on the
Windows platform and isn't UTF-16 now what the wide API functions expect
to see?

Lets say you send UTF-16 to unixodbc is it fine with this as well (on
win and gnu/linux)?
> >
> > Sorry lots of questions...
> No worries.

More information about the unixODBC-support mailing list