469,602 Members | 1,645 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Please Help with libpq and unicode

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

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 ---

Nov 23 '05 #1
0 2178

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dan Thibault | last post: by
reply views Thread by Timo Virkkala | last post: by
1 post views Thread by Phil Campaigne | last post: by
9 posts views Thread by Christian Wetzig | last post: by
1 post views Thread by Robert Fitzpatrick | last post: by
2 posts views Thread by alltest1 | last post: by
1 post views Thread by ekzept | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.