Connecting Tech Pros Worldwide Forums | Help | Site Map

Client Encoding in postgresql

Newbie
 
Join Date: May 2008
Posts: 27
#1: Dec 4 '08
hello all...

I am using postgres as my backend server and i need to insert some characters into tables... the server side encoding is UTF-8 and i am using the psqlODbc to connec to the database..
now for example if i try to insert some russian characters it inserts some '???????'
if i use the command set client encoding to UTF8, this sets the encoding to UTF-8 only for a particular session.

how do i make my application insert those russian values into my table..

Please help..

Thanks in advance for any help

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Jan 7 '09

re: Client Encoding in postgresql


1.)Make sure that your database encoding is set set UTF-8 (You can check that in pg_database).
2.) Make sure your client encoding is not set to SQL_ASCII.(That will disable all automatic conversion)
3.)Enable automatic client encoding using a persistent method. Section 21.2.3 of this page explains the different ways of doing it. The last ones are the more persistent.
Newbie
 
Join Date: May 2008
Posts: 27
#3: Jan 28 '09

re: Client Encoding in postgresql


thanks for your reply.. i ll do what ever you've suggested
Reply