473,698 Members | 2,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Nov 23 '05 #1
0 2412

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1793
by: Dan Thibault | last post by:
looking for help getting php4 to work with postgresql I first tried the following; ../configure --with-pgsql and got a --with-pgsql comand not found error I then tried; ../configure --with-pgsql=/usr/local/pgsql/lib/libpq.so and got --with-pgsql=/usr/local/pgsql/lib/libpq.so: No such file or directory
0
1446
by: Timo Virkkala | last post by:
Hello. I'm having some trouble with getting the pyPgSQL module to work. I installed it and the mxDateTime module into my local directory (I'm doing this on my university's server and I don't have access to /usr). When I try to import it I get the following error: >>> from pyPgSql import libpq Traceback (most recent call last): File "<stdin>", line 1, in ?
1
5701
by: Phil Campaigne | last post by:
Hi All, Took a break from developing on pgsql 7.3 to set up network printing where I added another host(localhost 193.168.1.2) in red hat network settings. Later, I could start postmaster but when I started psql I got the following error when I issue this command: psql -h localhost -U postgres nba -bash-2.05b$ psql -h localhost -U postgres nba psql: error while loading shared libraries: libpq.so.3: cannot open
9
2266
by: Christian Wetzig | last post by:
hi, i have a table with test_field of type "TEXT". when i do: select test_field from test where id=1; the connection (with psql) hangs and no output is received, so i have to kill psql. this occurs, at first sight, if length(test_field)>32748.
1
2172
by: Peggy Go | last post by:
Hi! I've downloaded postgreqsql-base-7.2.4.tar.gz but it says in the readme file that "This distribution also contains several language bindings, including C, Perl, Python, and Tcl, as well as a JDBC driver. The ODBC and C++ interfaces have been moved to the PostgreSQL Projects Web Site at http://gborg.postgresql.org for separate maintenance. "
2
2393
by: Jim Crate | last post by:
I'm trying to build a client program to access a database using the libpq interface on MacOS X 10.3.3 using CodeWarrior 9. PostgreSQL is at version 7.4.2. It compiles ok, but I get a link error. I have linked to libpq.a, because I got different errors before I did that. Here is the error I'm getting right now: Link Error: undefined: '@_1' (code) Referenced from 'pqSetenvPoll' in libpq.a Referenced from 'pqSetenvPoll' in libpq.a
1
2103
by: Robert Fitzpatrick | last post by:
I am getting the following problem with trying to install from source PHP 4.3.6 with PG support on FreeBSD 5.2.1. I have PostgreSQL 7.4.2 recently upgraded from 7.3.x and it is up and running fine. I also have Heimdal 0.6 installed and PostgreSQL was built with that support. Is the error below from something missing on the Heimdal side of things or PostgreSQL? And what does anyone suggest to resolve the issue? Maybe I need to rebuild...
2
2377
by: alltest1 | last post by:
Hi, I am wondering if it is thread-safe to use both JDBC and libpq simultaneously. On a Linux, JDBC is used by Tomcat and libpq is used by a client software written in C language. So JDBC and libpq are used by two different programs. If the same row in the same table is updated (update SQL command) through libpq and
1
2375
by: ekzept | last post by:
the module PGDB which gives Python access to PostgreSql currently wants for a copy of a properly located or proper libpq.dll library, on Windows. anyone know what the current story on this is? thanks, -- jt
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8611
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8904
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.