Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

[Q] unixODBC and Unicode (2byte vs 4 byte)



I am designing now my application and testing on Windows sofar
I would like to make sure that from a 'get go' I am doing the
'right thing' as far as

a) freebsd/windows/linux (32 and 64 bit support)
b) unicode support

my DB in encoded in UTF-8

with the help of this list and others I am now able to 
use OTL (the C++ library I use for ODBC) and
connect to Postgres Ascii ODBC and use std::string (even for utf-8)
and Unicode ODBC and use wstring for varchar

all on windows/32 bit sofar.

My question is:
what is the 'accepted' way of accessing UTF-8 encoded db on Linux and
Freebsd
is it via ODBC unicode (if such thing exists)
or ASCII unicode

and if it is via 'Unicode' what do I use as a C++ type to store
string results?
wstring or something else?  (because wstring is 4 bytes on unix and 2 on
windows)

Is pg ODBC Unicode driver on Linux/FreeBSD converting utf-8 into two
byte or
4 byte character strings?
(and what do most people do in this situation)


thank you in advance,
Vlad


-- 
  V S P
  toreason(at)fastmail(dot)fm

-- 
http://www.fastmail.fm - mmm... Fastmail...




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group