On Sat, Dec 18, 2010 at 10:14:07PM +0100, Martin Pitt wrote:
> Antti Salmela [2010-12-14 20:53 +0200]:
>> Switch from libreadline to libedit broke multibyte character input.
> Can you please be more specific? Basic cases work for me, in
> de_DE.UTF-8:
> $ sudo -u postgres psql
> psql (9.0.2)
> Geben Sie »help« für Hilfe ein.
> postgres=# select 'ä';
> ?column?
> ----------
> ä
> (1 Zeile)
postg...@host:/data/home/master$ locale|grep -v '"'
LANG=fr_LU.UTF-8
LC_MESSAGES=en_GB.UTF-8
LC_ALL=
postg...@trojan:/data/home/master$ psql db
psql (9.0.1)
Type "help" for help.
Now I copy/paste your select line:
db=# select '';
?column?
----------
(1 row)
The ä just never appears.
I press "up arrow", then "left arrow" twice then "Das Mdchen geht
raus.", then left arrow to go between the "M" and the "d":
db=# select 'Das Mdchen geht raus.';
^
(The "^" indicates the position of the cursor.)
So far, so good. Now I type "ä", I get:
db=# select 'Das MDchen geht raus.';
^
The "d" was capitalised and the cursor moves forward until the next
blank or punctuation, instead of "ä" appearing. Similar results with
é, è, ñ. Typing ° or ♥ causes the cursor to go backwards until
beginning of word. Typing ß transforms Mdchen into MDchenMDchen (with
cursor at the end of that word).
You seem to use a version of the package that is not in Debian. Are
you sure it is linked against libedit? I'm asking because you probably
compiled postgresql-9.0 (a version of the package you intend to upload
to Debian at some future date, maybe?) on your machine yourself, maybe
not in a clean-minimal chroot, and then maybe you had *both*
libedit-dev *and* libreadline-dev installed and the ./configure call
picked readline. That's a bug in itself, actually. Results of
compilation should not depend on what extra thing is or is not
installed, as long as no build-conflicts is declared. I suggest you
add "--with-libedit-preferred" to the ./configure call. (Declaring a
Build-Conflicts would fix that second bug, too, but it is less
convenient for developers and users wishing to recompile
postgresql-9.0.)
--
Lionel
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]