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

Problem with character encodings.

From: "Korumilli, Bala S (GE Healthcare)" <Bala(dot)Korumilli(at)ge(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Problem with character encodings.
Date: 2007-08-29 06:59:52
Message-ID: BF8B7E5C1F593446B8C0AD412C265ED7014680D5@BANMLVEM04.e2k.ad.ge.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi,
 
We recently moved to postgres.
We need a special character '°'  degree symbol in our database.
 
Query of interest:   INSERT INTO test1 VALUES(3,'sree°kanth','05/05/1983','06:06:06.234',3.2345677787);
 
If i use PGADMIN to run this query, '°' is properly inserted into database.
 
But If i write a c++ program using LIBPQ to run this query, I get an error of invalid byte sequence like this..
 
ERROR:  invalid byte sequence for encoding "UTF8".
 
I also observed the same error comes for all the characters other than ascii(0-127).
Is it a limitation of LibPQ library?
 
The follwing information may be helpful to you.
DataBase encoding: UTF8.
client_encoding: UTF8
Postgres version: 8.2.3
 
Can you please tell me what is the reason for this strange behaviour?
 
 
Thanks & Regards
Bala Sreekanth.

Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 2007-08-30 00:19:23
Subject: Re: plpgsql: defuault parameters and constant function parameters
Previous:From: Brijesh ShrivastavDate: 2007-08-28 18:45:23
Subject: Re: Issue with PQdescribePortal to describe a select cursor

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group