Hi,
I have issues with editing commands in psql on OpenBSD. Backspace deletes
entire shown symbols but only one byte of multibyte symbols (cyrillics,
umlauts).
This causes that pressing backspace again deletes previous characters, and
edited commands cause an error: ERROR: invalid byte sequence for encoding
"UTF8"
I also have issues with typing long commands - sometimes newline is not
shown, instead the end of the command overwrites the beginning of the
displayed line.

I think the problem is with the use of the old readline library in base.
Preloading readline from ports fixes the problem.
$ LD_PRELOAD=/usr/local/lib/libereadline.so.2.0 psql

Changing locale does not help.

$ locale
LANG=ru_RU.UTF-8
LC_COLLATE="ru_RU.UTF-8"
LC_CTYPE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_ALL=ru_RU.UTF-8

Is it possible to change postgresql-client to compile with readline from
the ports?

-- 
Anton Kasimov

Reply via email to