From: Ivo Rossacher <rossacher@bluewin.ch>
To: pgsql-interfaces@postgresql.org
Subject: Re: Problem with character encodings.
Date: Thu, 30 Aug 2007 22:57:40 +0200
Message-ID: <200708302257.41123.rossacher@bluewin.ch> (raw)
In-Reply-To: <BF8B7E5C1F593446B8C0AD412C265ED7014680D5@BANMLVEM04.e2k.ad.ge.com>
References: <BF8B7E5C1F593446B8C0AD412C265ED7014680D5@BANMLVEM04.e2k.ad.ge.com>
Am Mittwoch, 29. August 2007 08:59 schrieb Korumilli, Bala S (GE Healthcare):
If the client_encoding is UTF8 you need to confert the strings in your c++
code to UTF8.
The other options to adjust the client_encoding to the encoding the client
machine uses and let the server convert from and to UTF8 for you. This would
your client program require to anlyze the encoding of the system and send set
client_encoding to '<found encoding>'; to the server.
See chapter 21 in the manual for more details about the issue.
Best regards
Ivo
> 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?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: rossacher@bluewin.ch
Subject: Re: Problem with character encodings.
In-Reply-To: <200708302257.41123.rossacher@bluewin.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox