1

I am having a problem with my Postgresql console. I can't write characters with accents. For example

á é í ó ú

When I write the character simply does not appear.

I have installed Postgresql 9.4 on debian server.

Can anybody help me?

daronwolff
  • 1,888
  • 20
  • 16

1 Answers1

1

OK - not really an answer, but...

You say that you can type the characters fine before you login to psql, and that SELECT chr(169) gives you a "©". So - we have a puzzle. Something between your keyboard/screen and psql on the server is causing problems.

Things we can try:

  1. Create a test.sql file which creates a test table and inserts some accented characters into it. Make sure that the file is in utf-8 encoding (most text editors will let you see/set this).
  2. Run your script from psql with \i /path/to/test.sql and see what results you get.
  3. Select from your test table again, but first do \o output.sql which will save the output into that file.

If everything is good, then the database end of things is handling everything just fine. If the screen looks funny but the file is ok then it's something to do with your terminal settings.

Richard Huxton
  • 19,615
  • 3
  • 35
  • 46
  • Hey!! It worked!! I can not understand why i cant type with accents but importing the SQL file is working!! Many thanks! – daronwolff Apr 08 '16 at 16:22
  • 1
    OK - so it's something outside the DB. If you ssh into the server, check your local machine is sending utf-8 properly. If not, it will be something odd in your terminal settings. – Richard Huxton Apr 08 '16 at 20:18