dbTalk Databases Forums  

Please Help with libpq and unicode

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Please Help with libpq and unicode in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Douglas Lochart
 
Posts: n/a

Default Please Help with libpq and unicode - 02-23-2005 , 08:17 AM






Hey all,

First off I am new to postgres and multi-lingual development so pardon me if
the answer is overly obvious.

We our database is setup for UNICODE. We have a mixture of clients
accessing the database through JDBC and C (libpq). My question involves the
C interface to Postgres libpq.

Once a query has been made (with client_connection set to unicode) I need to
get the data from result object using PQgetvalue(). PQgetvalue returns a
char*. There is some documentation about testing to see if the data is
binary and then casting it to the appropriate type. No where did it mention
the handling of unicode data.

So if I am executing PQgetvalue and I am expecting a unicode string what do
I have to do to get to the unicode data? cast it? convert it with a
utility?

An example would be greatly appreciated.

Thanks in advance

--
Every Time I close My Eyes
There is another vivid surprise
Another whole life waiting ...
Chapters unfinished, fading
--- Scenes From A Memory ---


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.