Wednesday, March 2, 2016

postgresql warning: Console code page (437) differs from Windows code page (1252) 8-bit characters might not work correctly

After you login from the command line through psql, you see the message,

      "psql (9.5.1)
        WARNING: Console code page (437) differs from Windows code page (1252)
                              8-bit characters might not work correctly. See psql reference
                              page "Notes for Windows users" for details.
          Type "help" for help."

This is because Windows console uses a different encoding than the psql console application. To solve this you need to set the code page for your psql before login.

To reset the code page:

           database => \q        //log out of the database

           C:\Users\dsmith> chcp 1252    //change code page to 1252
           Active code page: 1252

           C:\Users\dsmith> psql -d dbname -h host -p port -U username
           Password for user username:
           psql (9.5.1)
           Type "help" for help.



                        
If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one?Read the book free here.

No comments:

Post a Comment