Client Encoding in postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ravysters
    New Member
    • May 2008
    • 27

    Client Encoding in postgresql

    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
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    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.

    Comment

    • ravysters
      New Member
      • May 2008
      • 27

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

      Comment

      • vikkiatbipl
        New Member
        • Jan 2010
        • 2

        #4
        Thank you !

        It works fine

        Vikki A

        Comment

        Working...